Class: Hyrax::My::SharesSearchBuilder

Inherits:
SearchBuilder
  • Object
show all
Includes:
SearchBuilderBehavior
Defined in:
app/search_builders/hyrax/my/shares_search_builder.rb

Overview

Added to allow for the My controller to show only things I have edit access to

Instance Method Summary collapse

Methods included from SearchBuilderBehavior

#discovery_permissions

Instance Method Details

#show_only_shared_files(solr_parameters) ⇒ Object



8
9
10
11
12
13
# File 'app/search_builders/hyrax/my/shares_search_builder.rb', line 8

def show_only_shared_files(solr_parameters)
  solr_parameters[:fq] ||= []
  solr_parameters[:fq] += [
    "-" + ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: current_user_key)
  ]
end