Commit ad89850e authored by James Lopez's avatar James Lopez

refactor omniauth callbacks controller

parent 1adb89c1
...@@ -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