Sfoglia il codice sorgente

Fixed bug in user creation and admin role

Torkel Ödegaard 11 anni fa
parent
commit
0f63c04beb
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      pkg/services/sqlstore/user.go

+ 1 - 1
pkg/services/sqlstore/user.go

@@ -91,7 +91,7 @@ func CreateUser(cmd *m.CreateUserCommand) error {
 			Updated:   time.Now(),
 			Updated:   time.Now(),
 		}
 		}
 
 
-		if setting.SingleAccountMode {
+		if setting.SingleAccountMode && !user.IsAdmin {
 			accountUser.Role = m.RoleType(setting.DefaultAccountRole)
 			accountUser.Role = m.RoleType(setting.DefaultAccountRole)
 		}
 		}