Sha256: 605bd7bcb581d852e1e562c016111f6128e430be5372db4d491ece72395e5f3f
Contents?: true
Size: 780 Bytes
Versions: 1
Compression:
Stored size: 780 Bytes
Contents
module Spotlight::Catalog::AccessControlsEnforcement extend ActiveSupport::Concern included do self.search_params_logic += [:apply_permissive_visibility_filter] end protected def apply_permissive_visibility_filter solr_params, user_params return unless current_exhibit unless respond_to? :can? and can? :curate, current_exhibit solr_params.append_filter_query "-#{Spotlight::SolrDocument.visibility_field(current_exhibit)}:false" end if Spotlight::Engine.config.filter_resources_by_exhibit current_exhibit.solr_data.each do |facet_field, values| Array(values).each do |value| solr_params.append_filter_query search_builder.send(:facet_value_to_fq_string, facet_field, value) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blacklight-spotlight-0.4.1 | lib/spotlight/catalog/access_controls_enforcement.rb |