From 005bfb2ba737e500b49933b3f15ffbbb49c267a6 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Wed, 22 Jul 2020 12:37:18 +0200 Subject: [PATCH] Fix merge conflicts --- app/controllers/users/sessions_controller.rb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/controllers/users/sessions_controller.rb b/app/controllers/users/sessions_controller.rb index b50aacc43..5da9aaab6 100644 --- a/app/controllers/users/sessions_controller.rb +++ b/app/controllers/users/sessions_controller.rb @@ -68,15 +68,6 @@ class Users::SessionsController < Devise::SessionsController flash[:system_notification_modal] = true end - protected - - def remove_authenticate_mesasge_if_root_path - if session[:user_return_to] == root_path && flash[:alert] == I18n.t('devise.failure.unauthenticated') - flash[:alert] = nil - end - end - - private def authenticate_with_two_factor user = User.find_by(id: session[:otp_user_id]) @@ -120,6 +111,14 @@ class Users::SessionsController < Devise::SessionsController end + private + + def remove_authenticate_mesasge_if_root_path + if session[:user_return_to] == root_path && flash[:alert] == I18n.t('devise.failure.unauthenticated') + flash[:alert] = nil + end + end + def redirect_2fa user = User.find_by(email: params[:user][:email])