Sha256: 0fd1df94d8b64445829a9c71e3102c3ff0e330609c6a6613f0074e8ecb60633b

Contents?: true

Size: 496 Bytes

Versions: 25

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true
# Added to allow for the My controller to show only things I have edit access to
class Hyrax::My::SharesSearchBuilder < Hyrax::SearchBuilder
  include Hyrax::My::SearchBuilderBehavior

  self.default_processor_chain += [:show_only_shared_files]

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

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-5.0.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-5.0.0.rc3 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-5.0.0.rc2 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-5.0.0.rc1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.6.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-4.0.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-4.0.0.rc3 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-4.0.0.rc2 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-4.0.0.rc1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.5.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-4.0.0.beta2 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.4.2 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-4.0.0.beta1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.4.1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.4.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.3.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.2.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.1.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.0.2 app/search_builders/hyrax/my/shares_search_builder.rb