Module: Hyrax::FilterSuppressedWithRoles

Extended by:
ActiveSupport::Concern
Includes:
FilterSuppressed
Included in:
WorkSearchBuilder
Defined in:
app/search_builders/hyrax/filter_suppressed_with_roles.rb

Overview

Overrides FilterSuppressed filter to hide documents marked as suppressed when the current user is permitted to take no workflow actions for the work’s current state

Assumes presence of ‘blacklight_params` and a SolrDocument corresponding to that `:id` value

Instance Method Summary collapse

Instance Method Details

#only_active_works(solr_parameters) ⇒ Object

Skip the filter if the current user is permitted to take workflow actions on the work corresponding to the SolrDocument with id = ‘blacklight_params`



15
16
17
18
# File 'app/search_builders/hyrax/filter_suppressed_with_roles.rb', line 15

def only_active_works(solr_parameters)
  return if user_has_active_workflow_role?
  super
end