Fixed bug in user creation and admin role
This commit is contained in:
@@ -91,7 +91,7 @@ func CreateUser(cmd *m.CreateUserCommand) error {
|
||||
Updated: time.Now(),
|
||||
}
|
||||
|
||||
if setting.SingleAccountMode {
|
||||
if setting.SingleAccountMode && !user.IsAdmin {
|
||||
accountUser.Role = m.RoleType(setting.DefaultAccountRole)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user