Sha256: 6751b745b9b0f1449f4e56f516caa914a6459e58750fbafb943d42ba77d201ac
Contents?: true
Size: 793 Bytes
Versions: 12
Compression:
Stored size: 793 Bytes
Contents
module Hyrax module SearchFilters extend ActiveSupport::Concern include Hyrax::FilterByType include FilterSuppressed # Override Hydra::AccessControlsEnforcement (or Hydra::PolicyAwareAccessControlsEnforcement) # Allows admin users to see everything (don't apply any gated_discovery_filters for those users) def gated_discovery_filters(permission_types = discovery_permissions, ability = current_ability) return [] if ability.admin? super end private # TODO: could this be moved to Blacklight::AccessControls::Enforcement? def current_user_key current_user.user_key end # TODO: could this be moved to Blacklight::AccessControls::Enforcement? def current_user scope.current_user end end end
Version data entries
12 entries across 12 versions & 1 rubygems