diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-21 18:21:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-21 18:21:10 +0300 |
commit | e33f87ac0fabaab468ce4b457996cc0f1b1bb648 (patch) | |
tree | 8bf0de72a9acac014cfdaddab7d463b208294af2 /app/services/users | |
parent | 5baf990db20a75078684702782c24399ef9eb0fa (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/users')
-rw-r--r-- | app/services/users/build_service.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/services/users/build_service.rb b/app/services/users/build_service.rb index 6f9f307c322..3938d675596 100644 --- a/app/services/users/build_service.rb +++ b/app/services/users/build_service.rb @@ -81,7 +81,8 @@ module Users :private_profile, :organization, :location, - :public_email + :public_email, + :user_type ] end @@ -95,7 +96,8 @@ module Users :first_name, :last_name, :password, - :username + :username, + :user_type ] end @@ -127,6 +129,8 @@ module Users user_params[:external] = user_external? end + user_params.delete(:user_type) unless project_bot?(user_params[:user_type]) + user_params end @@ -137,6 +141,10 @@ module Users def user_external? user_default_internal_regex_instance.match(params[:email]).nil? end + + def project_bot?(user_type) + user_type&.to_sym == :project_bot + end end end |