Sha256: d5aadfb439cc4983599224bc7402817df5617333c512b28bd13be461575dc4d3
Contents?: true
Size: 581 Bytes
Versions: 23
Compression:
Stored size: 581 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 filters = gated_discovery_filters(permission_types, ability).join(" OR ") spawn.where!(filters) end end ActiveFedora::Querying.module_eval do delegate :accessible_by, :to=>:all end
Version data entries
23 entries across 23 versions & 1 rubygems