Skip to content

Commit fe6ae27

Browse files
committed
Allow org name change in DISABLE_LOCAL_USER_MANAGEMENT mode
Fixes 500 on organization name change in DISABLE_LOCAL_USER_MANAGEMENT mode. Fixes: eca3563 Author-Change-Id: IB#1105051
1 parent d97a8ea commit fe6ae27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ func checkDupEmail(e Engine, u *User) error {
11291129
// updateUserAllowed is used to block updating selected user fields when local user managemement is disabled.
11301130
func updateUserAllowed(u *User) error {
11311131
// Don't allow changes of selected user fields if local user management is disabled.
1132-
if setting.Service.DisableLocalUserManagement {
1132+
if setting.Service.DisableLocalUserManagement && (u.Type == UserTypeIndividual) {
11331133
if currUser, err := GetUserByID(u.ID); err == nil {
11341134
if currUser.Name != u.Name {
11351135
return fmt.Errorf("cannot change user %s username; local user management disabled", u.Name)

0 commit comments

Comments
 (0)