Commit 282f3229 authored by Valery Sizov's avatar Valery Sizov

[CE->EE] Fix saml related spec spec/features/login_spec.rb:156

parent d0bfe999
...@@ -32,6 +32,15 @@ module Gitlab ...@@ -32,6 +32,15 @@ module Gitlab
protected protected
def find_by_email
if auth_hash.has_attribute?(:email)
user = ::User.find_by(email: auth_hash.email.downcase)
user.identities.new(extern_uid: auth_hash.uid, provider: auth_hash.provider) if user
user
end
end
def auto_link_saml_user? def auto_link_saml_user?
Gitlab.config.omniauth.auto_link_saml_user Gitlab.config.omniauth.auto_link_saml_user
end end
......
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