BigW Consortium Gitlab

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

Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
parent 0a581fcf
...@@ -20,10 +20,8 @@ module Gitlab ...@@ -20,10 +20,8 @@ module Gitlab
user ||= find_or_build_ldap_user if auto_link_ldap_user? user ||= find_or_build_ldap_user if auto_link_ldap_user?
user ||= build_new_user if signup_enabled? user ||= build_new_user if signup_enabled?
if external_users_enabled? && user if user
# Check if there is overlap between the user's groups and the external groups user.external = !(auth_hash.groups & saml_config.external_groups).empty? if external_users_enabled?
# setting then set user as external or internal.
user.external = !(auth_hash.groups & saml_config.external_groups).empty?
end end
user 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