Commit 5fa10409 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'feature/audit-events-failed-login-2' into 'master'

Refactor omniauth controller code

See merge request !2619
parents d262f2b5 ad89850e
...@@ -5,18 +5,10 @@ module EE ...@@ -5,18 +5,10 @@ module EE
def fail_login def fail_login
log_failed_login(@user.username, oauth['provider']) log_failed_login(@user.username, oauth['provider'])
error_message = @user.errors.full_messages.to_sentence super
return redirect_to omniauth_error_path(oauth['provider'], error: error_message)
end end
def fail_ldap_login alias_method :fail_ldap_login, :fail_login
log_failed_login(@user.username, oauth['provider'])
flash[:alert] = 'Access denied for your LDAP account.'
redirect_to new_user_session_path
end
private private
......
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