Sha256: 3ff86b2317855026416bd3d2cadd3ab28c765d82651e792ff2c72fb95acbf0ca

Contents?: true

Size: 1.14 KB

Versions: 19

Compression:

Stored size: 1.14 KB

Contents

require 'rails'
require 'active-fedora'
require 'blacklight'
require 'cancan'
require "deprecation"
require 'blacklight-access_controls'

module Hydra
  extend ActiveSupport::Autoload
  autoload :AccessControls
  autoload :User
  autoload :AccessControlsEnforcement
  autoload :PolicyAwareAccessControlsEnforcement
  autoload :Ability
  autoload :Config
  autoload :PolicyAwareAbility
  autoload :AdminPolicy
  autoload :AdminPolicyBehavior
  autoload :RoleMapperBehavior
  autoload :PermissionsQuery
  autoload :IpBasedGroups

  class << self
    def configure(_ = nil)
      @config ||= Config.new
      yield @config if block_given?
      @config
    end
    alias :config :configure
  end

  class Engine < Rails::Engine
    # autoload_paths is only necessary for Rails 3
    config.autoload_paths += %W(
      #{config.root}/app/models/concerns
    )
  end

  # This error is raised when a user isn't allowed to access a given controller action.
  # This usually happens within a call to AccessControlsEnforcement#enforce_access_controls but can be
  # raised manually.
  class AccessDenied < ::CanCan::AccessDenied; end
end

require 'active_fedora/accessible_by'

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
hydra-access-controls-10.5.1 lib/hydra-access-controls.rb
hydra-access-controls-11.0.0.rc1 lib/hydra-access-controls.rb
hydra-access-controls-10.5.0 lib/hydra-access-controls.rb
hydra-access-controls-10.4.0 lib/hydra-access-controls.rb
hydra-access-controls-10.4.0.rc2 lib/hydra-access-controls.rb
hydra-access-controls-10.4.0.rc1 lib/hydra-access-controls.rb
hydra-access-controls-10.3.4 lib/hydra-access-controls.rb
hydra-access-controls-10.3.3 lib/hydra-access-controls.rb
hydra-access-controls-10.3.2 lib/hydra-access-controls.rb
hydra-access-controls-10.3.0 lib/hydra-access-controls.rb
hydra-access-controls-10.2.0 lib/hydra-access-controls.rb
hydra-access-controls-10.1.0 lib/hydra-access-controls.rb
hydra-access-controls-10.0.2 lib/hydra-access-controls.rb
hydra-access-controls-10.0.1 lib/hydra-access-controls.rb
hydra-access-controls-10.0.0 lib/hydra-access-controls.rb
hydra-access-controls-10.0.0.beta4 lib/hydra-access-controls.rb
hydra-access-controls-10.0.0.beta3 lib/hydra-access-controls.rb
hydra-access-controls-10.0.0.beta2 lib/hydra-access-controls.rb
hydra-access-controls-10.0.0.beta1 lib/hydra-access-controls.rb