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:
Douglas Barbosa Alexandre 2019-04-05 13:43:45 +00:00
commit 8e04450cc2

View file

@ -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