diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-08 12:47:09 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-08 12:47:09 +0100 |
commit | 048605bd33935cd2b37c72bf2b725e9c37e1f6e8 (patch) | |
tree | caf35eb873412ae71721e9244c1f899e351cff3e /app/models/user.rb | |
parent | a426fb1596978221510c8c78a17703658ad7d161 (diff) | |
parent | f5430e48b42227f1c1874ca27c6907f0f704be28 (diff) | |
download | gitlab-ce-issue-closing-docs.tar.gz |
Merge branch 'master' into issue-closing-docsissue-closing-docs
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 719b49b16fe..cfed797e725 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -148,11 +148,9 @@ class User < ActiveRecord::Base validates :bio, length: { maximum: 255 }, allow_blank: true validates :projects_limit, presence: true, numericality: { greater_than_or_equal_to: 0 } validates :username, + namespace: true, presence: true, - uniqueness: { case_sensitive: false }, - exclusion: { in: Gitlab::Blacklist.path }, - format: { with: Gitlab::Regex.namespace_regex, - message: Gitlab::Regex.namespace_regex_message } + uniqueness: { case_sensitive: false } validates :notification_level, inclusion: { in: Notification.notification_levels }, presence: true validate :namespace_uniq, if: ->(user) { user.username_changed? } |