Merge pull request #2991 from raphendyr/username_change_disablation
Add option to disable username changing
This commit is contained in:
commit
e049e18780
5 changed files with 34 additions and 25 deletions
|
@ -234,6 +234,10 @@ class User < ActiveRecord::Base
|
|||
keys.count == 0
|
||||
end
|
||||
|
||||
def can_change_username?
|
||||
Gitlab.config.gitlab.username_changing_enabled
|
||||
end
|
||||
|
||||
def can_create_project?
|
||||
projects_limit > owned_projects.count
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue