Sha256: 833901d01e5517cd5989fac07d4fee189e43ddf0d98c23d77331de7a79a4bebb
Contents?: true
Size: 667 Bytes
Versions: 36
Compression:
Stored size: 667 Bytes
Contents
module Hyrax module Dashboard class WorksSearchBuilder < Hyrax::WorksSearchBuilder include Hyrax::Dashboard::ManagedSearchFilters self.default_processor_chain += [:show_only_managed_works_for_non_admins] # Adds a filter to exclude works created by the current user if the # current user is not an admin. # @param [Hash] solr_parameters def show_only_managed_works_for_non_admins(solr_parameters) return if current_ability.admin? solr_parameters[:fq] ||= [] solr_parameters[:fq] << '-' + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key) end end end end
Version data entries
36 entries across 36 versions & 1 rubygems