Skip to content

Commit e29ab54

Browse files
committed
Allow non-local users to be renamed
1 parent 83d188f commit e29ab54

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

services/user/user.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ import (
3131
// RenameUser renames a user
3232
func RenameUser(ctx context.Context, u *user_model.User, newUserName string) error {
3333
// Non-local users are not allowed to change their username.
34-
if !u.IsOrganization() && !u.IsLocal() {
35-
return user_model.ErrUserIsNotLocal{
36-
UID: u.ID,
37-
Name: u.Name,
38-
}
39-
}
34+
// BLENDER: allow renaming local users.
35+
//if !u.IsOrganization() && !u.IsLocal() {
36+
// return user_model.ErrUserIsNotLocal{
37+
// UID: u.ID,
38+
// Name: u.Name,
39+
// }
40+
//}
4041

4142
if newUserName == u.Name {
4243
return user_model.ErrUsernameNotChanged{

0 commit comments

Comments
 (0)