Sha256: f83ed9c920faf33bb8416d010ee0de9538a1b61979b2078d1b2111c645ebc264

Contents?: true

Size: 635 Bytes

Versions: 2

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_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

2 entries across 2 versions & 1 rubygems

Version Path
optimacms-0.4.3 spec/dummy/app/controllers/application_controller.rb
optimacms-0.4.2 spec/dummy/app/controllers/application_controller.rb