Module: Blacklight::AccessControls::Catalog
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/blacklight/access_controls/catalog.rb
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.
12 13 14 15 16 17 18 |
# File 'lib/blacklight/access_controls/catalog.rb', line 12 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 |