diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-30 15:47:05 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-30 15:49:43 +0000 |
commit | 5715cc4628f9ebd99448f85fdf3e2c191d3d2875 (patch) | |
tree | 3ff0f8faeb3b07099d258937188f7fe29ab9ffc6 /app/controllers/admin_controller.rb | |
parent | 081d912ee868843c5b73b201761b1d8d19239e34 (diff) |
If we're doing admin authentication internally, don't bother with the request environment, set the admin_name on the session instead.
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r-- | app/controllers/admin_controller.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index dd966c4af..c25463f80 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -50,7 +50,7 @@ class AdminController < ApplicationController session[:using_admin] = 1 return else - if session[:using_admin].nil? + if session[:using_admin].nil? || session[:admin_name].nil? if params[:emergency].nil? if authenticated?( :web => _("To log into the administrative interface"), @@ -59,11 +59,12 @@ class AdminController < ApplicationController :user_name => "a superuser") if !@user.nil? && @user.admin_level == "super" session[:using_admin] = 1 - request.env['REMOTE_USER'] = @user.url_name + session[:admin_name] = @user.url_name else session[:using_admin] = nil session[:user_id] = nil + session[:admin_name] = nil self.authenticate end end @@ -71,7 +72,7 @@ class AdminController < ApplicationController authenticate_or_request_with_http_basic do |user_name, password| if user_name == Configuration::admin_username && password == Configuration::admin_password session[:using_admin] = 1 - request.env['REMOTE_USER'] = user_name + session[:admin_name] = user_name else request_http_basic_authentication end |