Skip to content

Commit cce02a8

Browse files
brechtvlbartvdbraak
authored andcommitted
BLENDER: Allow non-local users to be renamed
For Blender ID hook to do this.
1 parent 7cae455 commit cce02a8

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
@@ -36,12 +36,13 @@ func RenameUser(ctx context.Context, u *user_model.User, newUserName string) err
3636
}
3737

3838
// Non-local users are not allowed to change their username.
39-
if !u.IsOrganization() && !u.IsLocal() {
40-
return user_model.ErrUserIsNotLocal{
41-
UID: u.ID,
42-
Name: u.Name,
43-
}
44-
}
39+
// BLENDER: allow renaming local users.
40+
//if !u.IsOrganization() && !u.IsLocal() {
41+
// return user_model.ErrUserIsNotLocal{
42+
// UID: u.ID,
43+
// Name: u.Name,
44+
// }
45+
//}
4546

4647
if err := user_model.IsUsableUsername(newUserName); err != nil {
4748
return err

0 commit comments

Comments
 (0)