Module: CurationConcerns::SearchFilters

Extended by:
ActiveSupport::Concern
Includes:
FilterByType, FilterSuppressed
Defined in:
app/search_builders/curation_concerns/search_filters.rb

Instance Method Summary collapse

Methods included from FilterSuppressed

#only_active_works

Methods included from FilterByType

#filter_models

Instance Method Details

#discovery_permissionsObject

show only files with edit permissions in lib/hydra/access_controls_enforcement.rb apply_gated_discovery



14
15
16
17
# File 'app/search_builders/curation_concerns/search_filters.rb', line 14

def discovery_permissions
  return ['edit'] if blacklight_params[:works] == 'mine'
  super
end

#gated_discovery_filters(permission_types = discovery_permissions, ability = current_ability) ⇒ Object

Override Hydra::AccessControlsEnforcement (or Hydra::PolicyAwareAccessControlsEnforcement) Allows admin users to see everything (don’t apply any gated_discovery_filters for those users)



8
9
10
11
# File 'app/search_builders/curation_concerns/search_filters.rb', line 8

def gated_discovery_filters(permission_types = discovery_permissions, ability = current_ability)
  return [] if ability.admin?
  super
end