Read about our upcoming Code of Conduct on this issue

Commit 8616214c authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Minimize CE/EE difference in Gitlab::Auth::Saml::User


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 706743056949
......@@ -20,10 +20,8 @@ def find_user
user ||= find_or_build_ldap_user if auto_link_ldap_user?
user ||= build_new_user if signup_enabled?
if external_users_enabled? && user
# Check if there is overlap between the user's groups and the external groups
# setting then set user as external or internal.
user.external = !(auth_hash.groups & saml_config.external_groups).empty?
if user
user.external = !(auth_hash.groups & saml_config.external_groups).empty? if external_users_enabled?
end
user
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment