Sha256: 7477ea0d2c1dc96670ca90742088cf1fbb9969bdd1db7e3773f9d61de4eafaa9
Contents?: true
Size: 635 Bytes
Versions: 59
Compression:
Stored size: 635 Bytes
Contents
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception #before_filter :authenticate_beta if Rails.env.development? && Rails.application.config.TEST_ADMIN_PWD!='' #before_filter :authenticate_beta if Rails.env.development? def authenticate_beta authenticate_or_request_with_http_basic('Administration') do |username, password| #username == 'admin' && password == Rails.application.config.TEST_ADMIN_PWD username == 'admin' && password == 'admin' end end end
Version data entries
59 entries across 59 versions & 1 rubygems