diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-07-02 13:09:06 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-07-02 13:09:06 +0100 |
commit | de929cfe8c0f297c9945189f1456bba3908498a1 (patch) | |
tree | b8ddd5f1875723bda896c66084bc438fe6b8c088 /app/controllers/admin_controller.rb | |
parent | 84a27578e5e82739e3a6826c5d2d9890edd600a4 (diff) | |
parent | a9f1d84e7810936f7917c8a367b4713ea77554c9 (diff) |
Merge branch 'master' into wdtk
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r-- | app/controllers/admin_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 884d7e540..d8fda9c01 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -47,8 +47,6 @@ class AdminController < ApplicationController end end - private - def authenticate if MySociety::Config.get('SKIP_ADMIN_AUTH', false) session[:using_admin] = 1 @@ -64,6 +62,11 @@ class AdminController < ApplicationController if !@user.nil? && @user.admin_level == "super" session[:using_admin] = 1 request.env['REMOTE_USER'] = @user.url_name + else + + session[:using_admin] = nil + session[:user_id] = nil + self.authenticate end end else |