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
This commit is contained in:
commit
8e04450cc2
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue