Simplified single org settings, now auto_assign_org, and auto_assign_org_role, new [users] config section, Closes #1585
This commit is contained in:
@@ -15,9 +15,8 @@ func TestAccountDataAccess(t *testing.T) {
|
||||
InitTestDB(t)
|
||||
|
||||
Convey("Given single org mode", func() {
|
||||
setting.SingleOrgMode = true
|
||||
setting.DefaultOrgName = "test"
|
||||
setting.DefaultOrgRole = "Viewer"
|
||||
setting.AutoAssignOrg = true
|
||||
setting.AutoAssignOrgRole = "Viewer"
|
||||
|
||||
Convey("Users should be added to default organization", func() {
|
||||
ac1cmd := m.CreateUserCommand{Login: "ac1", Email: "ac1@test.com", Name: "ac1 name"}
|
||||
@@ -39,8 +38,7 @@ func TestAccountDataAccess(t *testing.T) {
|
||||
})
|
||||
|
||||
Convey("Given two saved users", func() {
|
||||
setting.SingleOrgMode = false
|
||||
setting.DefaultOrgName = "test"
|
||||
setting.AutoAssignOrg = false
|
||||
|
||||
ac1cmd := m.CreateUserCommand{Login: "ac1", Email: "ac1@test.com", Name: "ac1 name"}
|
||||
ac2cmd := m.CreateUserCommand{Login: "ac2", Email: "ac2@test.com", Name: "ac2 name", IsAdmin: true}
|
||||
|
||||
Reference in New Issue
Block a user