Module: Hydra::Controller::DownloadBehavior
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/hydra/controller/download_behavior.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#show ⇒ Object
Responds to http requests to show the datastream.
Instance Method Details
#show ⇒ Object
Responds to http requests to show the datastream
12 13 14 15 16 17 18 19 20 |
# File 'lib/hydra/controller/download_behavior.rb', line 12 def show if can_download? # we can now examine asset and determine if we should send_content, or some other action. send_content (asset) else logger.info "Can not read #{params['id']}" raise Hydra::AccessDenied.new("You do not have sufficient access privileges to read this document, which has been marked private.", :read, params[:id]) end end |