Sha256: 9aa889e5220672bc4fc6f1a4580d4e4eb0d118136e1607330e4856c34a362577

Contents?: true

Size: 466 Bytes

Versions: 48

Compression:

Stored size: 466 Bytes

Contents

# 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

48 entries across 48 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.9.5 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.9.4 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.9.3 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.9.2 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.9.1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.9.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.8.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.7.2 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.7.1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.7.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.6.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.0.0.pre.rc1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.0.0.pre.beta3 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.5.1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.5.0 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.0.0.pre.beta2 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.4.1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-3.0.0.pre.beta1 app/search_builders/hyrax/my/shares_search_builder.rb
hyrax-2.4.0 app/search_builders/hyrax/my/shares_search_builder.rb