Skip to content

Commit

Permalink
blacklight configurations need to indicate that exhibit, browse, and …
Browse files Browse the repository at this point in the history
…search params are permitted
  • Loading branch information
barmintor committed May 11, 2022
1 parent 522ba26 commit 47a06f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/concerns/spotlight/catalog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ module Catalog

included do
before_action :add_facet_visibility_field

blacklight_config.search_state_fields.tap do |allowed_fields|
# if the blacklight config may be filtering params, add the required fields for exihibits, browse and search
allowed_fields&.concat(%i[browse_category_id exhibit_id id] - Array(allowed_fields))
end
end

# Adds a facet to display document visibility for the current exhibit
Expand Down
5 changes: 5 additions & 0 deletions app/models/spotlight/blacklight_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ def blacklight_config
config.navbar.partials[:search_history].if = false if config.navbar.partials.key? :search_history
end

config.search_state_fields.tap do |allowed_fields|
# if the blacklight config may be filtering params, add the required fields for exihibits, browse and search
allowed_fields&.concat(%i[browse_category_id exhibit_id id] - Array(allowed_fields))
end

config
end
end
Expand Down

0 comments on commit 47a06f3

Please sign in to comment.