Sha256: 59f603080b2e2ec4bf99084d47a773d44cfbc5b41d4133e59e49905d50bd276b

Contents?: true

Size: 945 Bytes

Versions: 6

Compression:

Stored size: 945 Bytes

Contents

# This allows Authz to eager_load the scopables when your application boots
# if you have eager_loading disabled.
# If you change the location of the scopables, adjust the path.
# Not loading the scopables can lead to inconsistent behaviour.
unless Rails.configuration.eager_load
  Dir[Rails.root.join('app/scopables/**/*.rb')].each{ |f| require f }
end

Authz.configure do |config|
  # The method that Authz should use to force authentication into the Authorization Admin
  config.force_authentication_method = :authenticate_user!

  # The method used to access the current user
  config.current_user_method = :current_user

  # Enable cross-request caching
  # You will need to configure your Rails app
  # to perform caching through ActiveSupport::Cache
  # See: https://guides.rubyonrails.org/caching_with_rails.html
  #
  # Authz will use the same cache store that you configure
  # for your app.
  # config.cross_request_caching = true
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
authz-0.0.5 lib/generators/authz/install/templates/initializer.rb
authz-0.0.4 lib/generators/authz/install/templates/initializer.rb
authz-0.0.3 lib/generators/authz/install/templates/initializer.rb
authz-0.0.2 lib/generators/authz/install/templates/initializer.rb
authz-0.0.1 lib/generators/authz/install/templates/initializer.rb
authz-0.0.1.alpha5 lib/generators/authz/install/templates/initializer.rb