Module: CurationConcerns::SearchFilters
- Extended by:
- ActiveSupport::Concern
- Includes:
- FilterByType, FilterSuppressed
- Defined in:
- app/search_builders/curation_concerns/search_filters.rb
Instance Method Summary collapse
-
#discovery_permissions ⇒ Object
show only files with edit permissions in lib/hydra/access_controls_enforcement.rb apply_gated_discovery.
-
#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).
Methods included from FilterSuppressed
Methods included from FilterByType
Instance Method Details
#discovery_permissions ⇒ Object
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 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( = , ability = current_ability) return [] if ability.admin? super end |