diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-07-26 17:19:14 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-07-27 08:59:43 +0100 |
commit | 000b14b71c9dfb7b545240d8ca7ac19cae424a99 (patch) | |
tree | 8e78ea91f706efb60391774f718f37cb2fc0b074 /app/controllers/admin_controller.rb | |
parent | c9d177817c3b891c0bda9f63156c1f2ccaeeb157 (diff) |
Authentication should only apply to admin interface when *both* email *and* password are unset
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r-- | app/controllers/admin_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 8598091d9..375c19529 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -48,7 +48,7 @@ class AdminController < ApplicationController def authenticate username = MySociety::Config.get('ADMIN_USERNAME', '') password = MySociety::Config.get('ADMIN_PASSWORD', '') - if !(username && password).empty? + if !username.empty? && !password.empty? authenticate_or_request_with_http_basic do |user_name, password| user_name == username && password == password end |