Sha256: ce250204e6087e715d8984001bfdad970f850ad41bd91de8851462b4366496db
Contents?: true
Size: 559 Bytes
Versions: 46
Compression:
Stored size: 559 Bytes
Contents
ActiveFedora::QueryMethods.module_eval do extend ActiveSupport::Concern included do include Hydra::AccessControlsEnforcement end def accessible_by(ability, action = :index) permission_types = case action when :index then [:discover, :read, :edit] when :show, :read then [:read, :edit] when :update, :edit, :create, :new, :destroy then [:edit] end spawn.where!(gated_discovery_filters(permission_types, ability).join(" OR ")) end end ActiveFedora::Querying.module_eval do delegate :accessible_by, :to=>:all end
Version data entries
46 entries across 46 versions & 1 rubygems