From f59700138f7360436767fddea554c739e2cd484b Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 25 Sep 2012 08:55:35 +1000 Subject: Extract configuration with defaults into one module --- app/controllers/admin_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/controllers/admin_controller.rb') 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 -- cgit v1.2.3 From 28ae5eb5595b41e06da5d74a6670b806364ef23a Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 9 Oct 2012 11:38:23 +1100 Subject: Remove svn tags that are out of date as we are now using git --- app/controllers/admin_controller.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/controllers/admin_controller.rb') diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index b0c936a62..dd966c4af 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -3,8 +3,6 @@ # # Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ -# -# $Id: admin_controller.rb,v 1.29 2009-09-17 10:24:35 francis Exp $ require 'fileutils' -- cgit v1.2.3