| 
				
			 | 
			
			
				@@ -1,4 +1,5 @@ 
			 | 
		
	
		
			
			| 
				1
			 | 
			
				1
			 | 
			
			
				 class AuthenticationController < ApplicationController 
			 | 
		
	
		
			
			| 
				
			 | 
			
				2
			 | 
			
			
				+  before_action :require_login!, only: [:logout_confirm, :logout] 
			 | 
		
	
		
			
			| 
				2
			 | 
			
				3
			 | 
			
			
				   def login_form 
			 | 
		
	
		
			
			| 
				3
			 | 
			
				4
			 | 
			
			
				     render layout: 'void' 
			 | 
		
	
		
			
			| 
				4
			 | 
			
				5
			 | 
			
			
				   end 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -14,7 +15,7 @@ class AuthenticationController < ApplicationController 
			 | 
		
	
		
			
			| 
				14
			 | 
			
				15
			 | 
			
			
				         log_in(u, params[:session][:remember_me].to_i) 
			 | 
		
	
		
			
			| 
				15
			 | 
			
				16
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				16
			 | 
			
				17
			 | 
			
			
				         flash[:success] = "Hello, #{u.person.full_name}!" 
			 | 
		
	
		
			
			| 
				17
			 | 
			
				
			 | 
			
			
				-        redirect_to dashboard_home_path 
			 | 
		
	
		
			
			| 
				
			 | 
			
				18
			 | 
			
			
				+        redirect_to root_path 
			 | 
		
	
		
			
			| 
				18
			 | 
			
				19
			 | 
			
			
				       else 
			 | 
		
	
		
			
			| 
				19
			 | 
			
				20
			 | 
			
			
				         flash[:danger] = "Invalid username/password combination!" 
			 | 
		
	
		
			
			| 
				20
			 | 
			
				21
			 | 
			
			
				         redirect_to action: 'login_form' 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -22,7 +23,7 @@ class AuthenticationController < ApplicationController 
			 | 
		
	
		
			
			| 
				22
			 | 
			
				23
			 | 
			
			
				     end 
			 | 
		
	
		
			
			| 
				23
			 | 
			
				24
			 | 
			
			
				   end 
			 | 
		
	
		
			
			| 
				24
			 | 
			
				25
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				25
			 | 
			
				
			 | 
			
			
				-  def logout_form 
			 | 
		
	
		
			
			| 
				
			 | 
			
				26
			 | 
			
			
				+  def logout_confirm 
			 | 
		
	
		
			
			| 
				26
			 | 
			
				27
			 | 
			
			
				     render layout: 'void' 
			 | 
		
	
		
			
			| 
				27
			 | 
			
				28
			 | 
			
			
				   end 
			 | 
		
	
		
			
			| 
				28
			 | 
			
				29
			 | 
			
			
				  
			 |