summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorReza Mohammadi <reza@cafebazaar.ir>2017-01-12 20:33:25 +0330
committerReza Mohammadi <reza@cafebazaar.ir>2017-02-08 13:04:07 +0330
commitd9ee55ee38eb75f57ce9d1052ed23965a93f72b7 (patch)
tree87095b1c5a33ef68ca00d9690cc6c69a677f2cd9 /app
parentbbb7fbcd02c9d9a8a6d6ca44d7ce668b80962c21 (diff)
downloadgitlab-ce-d9ee55ee38eb75f57ce9d1052ed23965a93f72b7.tar.gz
Bypass signup domain validation for external users
Fixes #25279
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
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? }