Commit ad89850e authored by James Lopez's avatar James Lopez

refactor omniauth callbacks controller

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