Module: Hyrax::SearchFilters
- Extended by:
- ActiveSupport::Concern
- Includes:
- FilterByType, FilterSuppressed
- Defined in:
- app/search_builders/hyrax/search_filters.rb
Instance Method Summary collapse
-
#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).
-
#with_access(access) ⇒ SearchBuilder
TODO: move this to Hydra::AccessControlsEnforcement.
Methods included from FilterSuppressed
Methods included from FilterByType
Instance Method Details
#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)
18 19 20 21 |
# File 'app/search_builders/hyrax/search_filters.rb', line 18 def gated_discovery_filters( = , ability = current_ability) return [] if ability.admin? super end |
#with_access(access) ⇒ SearchBuilder
TODO: move this to Hydra::AccessControlsEnforcement
11 12 13 14 |
# File 'app/search_builders/hyrax/search_filters.rb', line 11 def with_access(access) @discovery_permissions = Array.wrap(access) self end |