summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2019-04-02 15:33:50 +0200
committerJames Lopez <james@jameslopez.es>2019-04-05 09:08:44 +0200
commitac07c066774e6f446f315021477c82536204aefe (patch)
tree1d20520487508adeed2ac4272c1f2f6c70976513
parentff648879642f81ccb5eda7c70b9738916a185630 (diff)
downloadgitlab-ce-ac07c066774e6f446f315021477c82536204aefe.tar.gz
Add saml provider to user build service9201-create-a-user-via-scim-ce
-rw-r--r--app/services/users/build_service.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/users/build_service.rb b/app/services/users/build_service.rb
index 3f503f3da28..30f7743c56e 100644
--- a/app/services/users/build_service.rb
+++ b/app/services/users/build_service.rb
@@ -26,7 +26,7 @@ module Users
end
end
- identity_attrs = params.slice(:extern_uid, :provider)
+ identity_attrs = params.slice(*identity_params)
unless identity_attrs.empty?
user.identities.build(identity_attrs)
@@ -37,6 +37,10 @@ module Users
private
+ def identity_params
+ [:extern_uid, :provider]
+ end
+
def can_create_user?
(current_user.nil? && Gitlab::CurrentSettings.allow_signup?) || current_user&.admin?
end