diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-05 13:43:45 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-05 13:43:45 +0000 |
commit | 8e04450cc284dd079427a7a9a3c1380f8cdc8767 (patch) | |
tree | 3191c0fa99327844df4b31a6575fade311b29e5f | |
parent | 9fb1dfa870372b0c95ae7c15cb82ff59472565d6 (diff) | |
parent | ac07c066774e6f446f315021477c82536204aefe (diff) | |
download | gitlab-ce-8e04450cc284dd079427a7a9a3c1380f8cdc8767.tar.gz |
Merge branch '9201-create-a-user-via-scim-ce' into 'master'
[CE] Add saml provider to user build service (Backport EE 10456)
See merge request gitlab-org/gitlab-ce!26903
-rw-r--r-- | app/services/users/build_service.rb | 6 |
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 |