Sha256: 77c2de208c78549a903d0dc990d26d567d5f5897579473d2dc8413a579280386

Contents?: true

Size: 603 Bytes

Versions: 8

Compression:

Stored size: 603 Bytes

Contents

module Hyrax
  # Added to allow for the Hyrax::My::WorksController to show only things I have deposited
  # If the work went through mediated deposit, I may no longer have edit access to it.
  class MyWorksSearchBuilder < ActiveWorksSearchBuilder
    self.default_processor_chain += [:show_only_resources_deposited_by_current_user]

    # We remove the access controls filter, because some of the works a user has
    # deposited may have gone through a workflow which has removed their ability
    # to edit the work.
    self.default_processor_chain -= [:add_access_controls_to_solr_params]
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hyrax-1.1.1 app/search_builders/hyrax/my_works_search_builder.rb
hyrax-1.1.0 app/search_builders/hyrax/my_works_search_builder.rb
hyrax-1.0.5 app/search_builders/hyrax/my_works_search_builder.rb
hyrax-1.0.4 app/search_builders/hyrax/my_works_search_builder.rb
hyrax-1.0.3 app/search_builders/hyrax/my_works_search_builder.rb
hyrax-1.0.2 app/search_builders/hyrax/my_works_search_builder.rb
hyrax-1.0.1 app/search_builders/hyrax/my_works_search_builder.rb
hyrax-1.0.0.rc2 app/search_builders/hyrax/my_works_search_builder.rb