Sha256: a13062d7e7d8c5d8276f6a8202eea35cab7333d814d9134cb50fa26341be6eed

Contents?: true

Size: 649 Bytes

Versions: 10

Compression:

Stored size: 649 Bytes

Contents

module RailsPerformance
  class BaseController < ActionController::Base
    include RailsPerformance::Concerns::CsvExportable
    layout "rails_performance/layouts/rails_performance"

    before_action :verify_access

    if RailsPerformance.http_basic_authentication_enabled
      http_basic_authenticate_with \
        name: RailsPerformance.http_basic_authentication_user_name,
        password: RailsPerformance.http_basic_authentication_password
    end

    private

    def verify_access
      result = RailsPerformance.verify_access_proc.call(self)
      redirect_to("/", error: "Access Denied", status: 401) unless result
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rails_performance-1.4.0 app/controllers/rails_performance/base_controller.rb
rails_performance-1.4.0.alpha5 app/controllers/rails_performance/base_controller.rb
rails_performance-1.4.0.alpha4 app/controllers/rails_performance/base_controller.rb
rails_performance-1.4.0.alpha3 app/controllers/rails_performance/base_controller.rb
rails_performance-1.4.0.alpha2 app/controllers/rails_performance/base_controller.rb
rails_performance-1.4.0.alpha1 app/controllers/rails_performance/base_controller.rb
rails_performance-1.3.3 app/controllers/rails_performance/base_controller.rb
rails_performance-1.3.2 app/controllers/rails_performance/base_controller.rb
rails_performance-1.3.1 app/controllers/rails_performance/base_controller.rb
rails_performance-1.3.0 app/controllers/rails_performance/base_controller.rb