Compare commits
2 Commits
v1.0.23
...
51d20dba37
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51d20dba37 | ||
|
|
2a400f4ee4 |
@@ -19,6 +19,7 @@ func TestDatabase(t *testing.T) {
|
|||||||
// set enviroment variables
|
// set enviroment variables
|
||||||
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
||||||
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
||||||
|
os.Setenv("DOMAIN", "localhost")
|
||||||
|
|
||||||
dbName := "user.db"
|
dbName := "user.db"
|
||||||
if _, err := os.Stat(dbName); err == nil {
|
if _, err := os.Stat(dbName); err == nil {
|
||||||
@@ -160,6 +161,7 @@ func TestDatabase(t *testing.T) {
|
|||||||
func TestLoginAndAuthorization(t *testing.T) {
|
func TestLoginAndAuthorization(t *testing.T) {
|
||||||
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
os.Setenv("ACCESS_SECRET", "12345678910111213141516171819202")
|
||||||
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
os.Setenv("REFRESH_SECRET", "9998979695949392919089888786858")
|
||||||
|
os.Setenv("DOMAIN", "localhost")
|
||||||
|
|
||||||
gin.SetMode(gin.TestMode)
|
gin.SetMode(gin.TestMode)
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ func (r *Permissions) DefaultPermissions() {
|
|||||||
*r = append(*r,
|
*r = append(*r,
|
||||||
Permission{Name: "settings", Permission: 7},
|
Permission{Name: "settings", Permission: 7},
|
||||||
Permission{Name: "userSettings", Permission: 7},
|
Permission{Name: "userSettings", Permission: 7},
|
||||||
Permission{Name: "members", Permission: 15},
|
Permission{Name: "members", Permission: 31},
|
||||||
Permission{Name: "events", Permission: 7},
|
Permission{Name: "events", Permission: 7},
|
||||||
Permission{Name: "responsible", Permission: 7},
|
Permission{Name: "responsible", Permission: 7},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user