diff options
Diffstat (limited to 'app/services/users/build_service.rb')
-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 |