Sha256: 91dbbd8581c176476c1b3166dd03776bcf5897b7a3b8eaa0e7d5c904d3e16e0b

Contents?: true

Size: 523 Bytes

Versions: 10

Compression:

Stored size: 523 Bytes

Contents

# TODO: make this a mixin and generate it into ::SearchBuilder
module Hyrax
  class SearchBuilder < Blacklight::SearchBuilder
    include Blacklight::Solr::SearchBuilderBehavior
    include Hydra::AccessControlsEnforcement
    include Hyrax::SearchFilters

    def show_only_resources_deposited_by_current_user(solr_parameters)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] += [
        ActiveFedora::SolrQueryBuilder.construct_query_for_rel(depositor: scope.current_user.user_key)
      ]
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/search_builders/hyrax/search_builder.rb
hyrax-1.1.0 app/search_builders/hyrax/search_builder.rb
hyrax-1.0.5 app/search_builders/hyrax/search_builder.rb
hyrax-1.0.4 app/search_builders/hyrax/search_builder.rb
hyrax-1.0.3 app/search_builders/hyrax/search_builder.rb
hyrax-1.0.2 app/search_builders/hyrax/search_builder.rb
hyrax-1.0.1 app/search_builders/hyrax/search_builder.rb
hyrax-1.0.0.rc2 app/search_builders/hyrax/search_builder.rb
hyrax-1.0.0.rc1 app/search_builders/hyrax/search_builder.rb
test_hyrax-0.0.1.alpha app/search_builders/hyrax/search_builder.rb