diff options
author | Nicolas Braud-Santoni <nicoo@ffgraz.net> | 2016-08-07 16:39:42 +0200 |
---|---|---|
committer | Nicolas Braud-Santoni <nicoo@ffgraz.net> | 2016-08-07 16:39:42 +0200 |
commit | b6ca062670b342344df08b53fb216db619ef42bc (patch) | |
tree | 7680ac6b407239f6b7272c937e42f688b8de542c /app/controllers/application.rb |
Import legacy manman source
Copied from www.ffgraz.net
Diffstat (limited to 'app/controllers/application.rb')
-rw-r--r-- | app/controllers/application.rb | 16 |
1 files changed, 16 insertions, 0 deletions
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 |