From b6ca062670b342344df08b53fb216db619ef42bc Mon Sep 17 00:00:00 2001 From: Nicolas Braud-Santoni Date: Sun, 7 Aug 2016 16:39:42 +0200 Subject: Import legacy manman source Copied from www.ffgraz.net --- app/controllers/application.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app/controllers/application.rb (limited to 'app/controllers/application.rb') diff --git a/app/controllers/application.rb b/app/controllers/application.rb new file mode 100644 index 0000000..30f98da --- /dev/null +++ b/app/controllers/application.rb @@ -0,0 +1,16 @@ +# Filters added to this controller will be run for all controllers in the application. +# Likewise, all the methods added will be available for all controllers. +class ApplicationController < ActionController::Base + before_filter :authenticate, :except => [ :login, :sign_on, :register, :create, :revoke_pass, :do_revoke, :smokeping, :all ] + + +protected + def authenticate + #session[:url] = url_for + session[:url] = request.env["REQUEST_URI"] + unless session[:person] + redirect_to :controller => 'person', + :action => 'login' + end + end +end -- cgit v1.2.1