diff options
author | Alex Legler <alex@a3li.li> | 2010-09-16 15:03:54 +0200 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2010-09-16 15:04:03 +0200 |
commit | b1a5e55ca78fe024da0fa828b5df3db62ec22a7f (patch) | |
tree | 3e4da81592c29d97ca11871b502d0717d6f0d5b2 /app/controllers/application_controller.rb | |
parent | Properly implement the list pages (diff) | |
download | glsamaker-b1a5e55ca78fe024da0fa828b5df3db62ec22a7f.tar.gz glsamaker-b1a5e55ca78fe024da0fa828b5df3db62ec22a7f.tar.bz2 glsamaker-b1a5e55ca78fe024da0fa828b5df3db62ec22a7f.zip |
Implement the Authorization system in GLSA:edit
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1d1438b..153168c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -20,4 +20,10 @@ class ApplicationController < ActionController::Base # filter_parameter_logging :password include Authentication + + protected + def deny_access(msg) + logger.warn "[#{Time.now.rfc2822}] UNAUTHORIZED ACCESS by #{current_user.login} from #{request.remote_ip}: #{msg}" + redirect_to :controller => 'index', :action => 'error', :type => 'access' + end end |