summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-10-22 12:37:05 +0200
committerRémy Coutable <remy@rymai.me>2018-11-13 13:24:53 +0100
commit1f0502df0a2759a9bdde3837bb57c667d3fa3c56 (patch)
tree678ecb7f392a6a0d865debc4f8e2e5b872fe881b /app/services
parentf2ef5e2ee8ae46d324e4136dbc95ea40d1f21841 (diff)
downloadgitlab-ce-1f0502df0a2759a9bdde3837bb57c667d3fa3c56.tar.gz
Fix a bug where internal email pattern wasn't respected52940-fix-internal-email-pattern-not-respected
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/services')
-rw-r--r--app/services/users/build_service.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/users/build_service.rb b/app/services/users/build_service.rb
index de6ff92d1da..24ac20fdd29 100644
--- a/app/services/users/build_service.rb
+++ b/app/services/users/build_service.rb
@@ -95,10 +95,6 @@ module Users
if params[:reset_password]
user_params.merge!(force_random_password: true, password_expires_at: nil)
end
-
- if user_default_internal_regex_enabled? && !user_params.key?(:external)
- user_params[:external] = user_external?
- end
else
allowed_signup_params = signup_params
allowed_signup_params << :skip_confirmation if skip_authorization
@@ -109,6 +105,10 @@ module Users
end
end
+ if user_default_internal_regex_enabled? && !user_params.key?(:external)
+ user_params[:external] = user_external?
+ end
+
user_params
end