Move username change decision into user model
This commit is contained in:
parent
de7012c4fb
commit
fcffb4c381
3 changed files with 6 additions and 2 deletions
|
@ -51,7 +51,7 @@ class ProfilesController < ApplicationController
|
|||
end
|
||||
|
||||
def update_username
|
||||
if Gitlab.config.gitlab.username_changing_enabled
|
||||
if @user.can_change_username?
|
||||
@user.update_attributes(username: params[:user][:username])
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue