Auth: Allow to auto-assign empty role (#73326)

Allow to auto-assign empty role
pull/73421/head
linoman 2 years ago committed by GitHub
parent f33f3a55a0
commit 2e050f25bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/services/user/userimpl/store_test.go
  2. 1
      pkg/setting/setting.go

@ -965,7 +965,7 @@ func TestMetricsUsage(t *testing.T) {
_, usrSvc := createOrgAndUserSvc(t, ss, ss.Cfg)
t.Run("", func(t *testing.T) {
t.Run("Get empty role metrics for an org", func(t *testing.T) {
orgId := int64(1)
// create first user

@ -1680,6 +1680,7 @@ func readUserSettings(iniFile *ini.File, cfg *Cfg) error {
cfg.AutoAssignOrgId = users.Key("auto_assign_org_id").MustInt(1)
cfg.AutoAssignOrgRole = users.Key("auto_assign_org_role").In(
string(roletype.RoleViewer), []string{
string(roletype.RoleNone),
string(roletype.RoleViewer),
string(roletype.RoleEditor),
string(roletype.RoleAdmin)})

Loading…
Cancel
Save