Merge pull request #2991 from raphendyr/username_change_disablation

Add option to disable username changing
This commit is contained in:
Dmitriy Zaporozhets 2013-02-18 09:59:24 -08:00
commit e049e18780
5 changed files with 34 additions and 25 deletions

View file

@ -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