Commit ff552fbd authored by Rémy Coutable's avatar Rémy Coutable

Resolve conflict in app/controllers/omniauth_callbacks_controller.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 459145fa
...@@ -36,11 +36,8 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -36,11 +36,8 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
prompt_for_two_factor(@user) prompt_for_two_factor(@user)
else else
log_audit_event(@user, with: oauth['provider']) log_audit_event(@user, with: oauth['provider'])
<<<<<<< HEAD
# The counter only gets incremented in `sign_in_and_redirect` # The counter only gets incremented in `sign_in_and_redirect`
show_ldap_sync_flash if @user.sign_in_count == 0 show_ldap_sync_flash if @user.sign_in_count == 0
=======
>>>>>>> upstream/master
sign_in_and_redirect(@user) sign_in_and_redirect(@user)
end end
else else
...@@ -159,13 +156,13 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -159,13 +156,13 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def oauth def oauth
@oauth ||= request.env['omniauth.auth'] @oauth ||= request.env['omniauth.auth']
end end
def fail_login def fail_login
error_message = @user.errors.full_messages.to_sentence error_message = @user.errors.full_messages.to_sentence
return redirect_to omniauth_error_path(oauth['provider'], error: error_message) return redirect_to omniauth_error_path(oauth['provider'], error: error_message)
end end
def fail_ldap_login def fail_ldap_login
flash[:alert] = 'Access denied for your LDAP account.' flash[:alert] = 'Access denied for your LDAP account.'
......
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