Module: Blacklight::AccessControls::Catalog
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/blacklight/access_controls/catalog.rb
Overview
This is behavior for the catalog controller.
Instance Method Summary collapse
-
#enforce_show_permissions(_opts = {}) ⇒ Object
Controller “before” filter for enforcing access controls on show actions.
Instance Method Details
#enforce_show_permissions(_opts = {}) ⇒ Object
Controller “before” filter for enforcing access controls on show actions.
10 11 12 13 14 15 16 |
# File 'lib/blacklight/access_controls/catalog.rb', line 10 def (_opts = {}) = current_ability.(params[:id]) unless can? :read, raise Blacklight::AccessControls::AccessDenied.new('You do not have sufficient access privileges to read this document, which has been marked private.', :read, params[:id]) end end |