aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r--app/controllers/admin_controller.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 08528f8a8..b0c936a62 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -48,7 +48,7 @@ class AdminController < ApplicationController
end
def authenticate
- if MySociety::Config.get('SKIP_ADMIN_AUTH', false)
+ if Configuration::skip_admin_auth
session[:using_admin] = 1
return
else
@@ -70,10 +70,8 @@ class AdminController < ApplicationController
end
end
else
- config_username = MySociety::Config.get('ADMIN_USERNAME', '')
- config_password = MySociety::Config.get('ADMIN_PASSWORD', '')
authenticate_or_request_with_http_basic do |user_name, password|
- if user_name == config_username && password == config_password
+ if user_name == Configuration::admin_username && password == Configuration::admin_password
session[:using_admin] = 1
request.env['REMOTE_USER'] = user_name
else