diff options
author | Robert Speicher <robert@gitlab.com> | 2017-02-08 23:47:38 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-02-08 23:47:38 +0300 |
commit | b28d66c38d95e779157e9f68f68e7ca3b0ba2521 (patch) | |
tree | 7bdc9278cf5bbf63dd05f615cff98f0991bafd8c /app | |
parent | d01cd84e69999677b5cb0d4f03d140f33cfdc0f7 (diff) | |
parent | d9ee55ee38eb75f57ce9d1052ed23965a93f72b7 (diff) |
Merge branch 'bypass-whitelist-for-external-user' into 'master'
Bypass signup domain validation for external users
Closes #25279
See merge request !8575
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index f64d0c17a45..33666b4f35b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -119,7 +119,7 @@ class User < ActiveRecord::Base validates :avatar, file_size: { maximum: 200.kilobytes.to_i } before_validation :generate_password, on: :create - before_validation :signup_domain_valid?, on: :create + before_validation :signup_domain_valid?, on: :create, if: ->(user) { !user.created_by_id } before_validation :sanitize_attrs before_validation :set_notification_email, if: ->(user) { user.email_changed? } before_validation :set_public_email, if: ->(user) { user.public_email_changed? } |