Commit 78215890 authored by Tiago Botelho's avatar Tiago Botelho

Re-works create security event after failed oauth login spec to still work...

Re-works create security event after failed oauth login spec to still work after the new OAuth changes.
parent 282f3229
......@@ -32,15 +32,6 @@ module Gitlab
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?
Gitlab.config.omniauth.auto_link_saml_user
end
......
......@@ -154,7 +154,7 @@ feature 'Login' do
end
it 'creates a security event after failed OAuth login' do
stub_omniauth_saml_config(enabled: true, auto_link_saml_user: true, allow_single_sign_on: ['saml'], providers: [mock_saml_config])
stub_omniauth_saml_config(enabled: true, auto_link_saml_user: false, allow_single_sign_on: ['saml'], providers: [mock_saml_config])
stub_licensed_features(extended_audit_events: true)
user = create(:omniauth_user, :two_factor, extern_uid: 'my-uid', provider: 'saml')
......
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