Sha256: b841d8e8fabd63eade563da1e6c8de13c21afc154bc1a4be05547a224b14c947
Contents?: true
Size: 763 Bytes
Versions: 48
Compression:
Stored size: 763 Bytes
Contents
module Hyrax module My # Search builder for things that the current user has deposited and has edit access to # @abstract class SearchBuilder < ::SearchBuilder # Check for edit access include Hyrax::My::SearchBuilderBehavior self.default_processor_chain += [:show_only_resources_deposited_by_current_user] # adds a filter to the solr_parameters that filters the documents the current user # has deposited # @param [Hash] solr_parameters def show_only_resources_deposited_by_current_user(solr_parameters) solr_parameters[:fq] ||= [] solr_parameters[:fq] += [ ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key) ] end end end end
Version data entries
48 entries across 48 versions & 1 rubygems