Skip to content
Snippets Groups Projects
Commit f4d5f139 authored by Robin Ward's avatar Robin Ward
Browse files

Option to clear the username when not authorized

parent 2146382a
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,10 @@ class SamlAuthenticator < ::Auth::OAuth2Authenticator
result.user ||= User.where(email: Email.downcase(result.email)).first
if GlobalSetting.try(:saml_clear_username) && result.user.blank?
result.username = ''
end
result.extra_data = { saml_user_id: uid }
result
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment