class Admin::ApplicationController < ActionController::Base
  protect_from_forgery

  http_basic_authenticate_with :name => CONFIG[:admin_username], :password => CONFIG[:admin_password]

  layout 'admin/layouts/application'

end

class Admin::ApplicationController < ActionController::Base
  layout 'admin/layouts/application'

  protect_from_forgery

  http_basic_authenticate_with(:name => CONFIG[:admin_username], :password => CONFIG[:admin_password]) if ['staging', 'sales'].include?(Rails.env)
end

Add basic HTTP auth only for selected environments
Add basic HTTP auth only for selected environments
