Sha256: 712c35ab3c8b745782a255064b1d81781251f66b84b50cfebb639941a2e7b4e0
Contents?: true
Size: 653 Bytes
Versions: 6
Compression:
Stored size: 653 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_action :authenticate_beta if Rails.env.development? && Rails.application.config.TEST_ADMIN_PWD!='' #before_action :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
6 entries across 6 versions & 1 rubygems