lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt in authentication-zero-2.16.28 vs lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt in authentication-zero-2.16.29

- old
+ new

@@ -1,13 +1,13 @@ class Sessions::SudosController < ApplicationController def new end def create - session = Current.session + session_record = Current.session - if session.user.authenticate(params[:password]) - session.sudo.mark; redirect_to(params[:proceed_to_url]) + if session_record.user.authenticate(params[:password]) + session_record.sudo.mark; redirect_to(params[:proceed_to_url]) else redirect_to new_sessions_sudo_path(proceed_to_url: params[:proceed_to_url]), alert: "The password you entered is incorrect" end end end