Sha256: 1cb3917a9e7b3ac466621c96a67a00d342033373eb1134e6d56c9d3d418ca3ca
Contents?: true
Size: 712 Bytes
Versions: 4
Compression:
Stored size: 712 Bytes
Contents
module Sufia::SingularSubresourceController extend ActiveSupport::Concern included do before_action :find_work, only: :work load_and_authorize_resource :work, only: :work load_and_authorize_resource :file, class: 'FileSet', only: :file, id_param: :id end # Overriding the default behavior from Hydra::Core::ControllerBehavior def deny_access(exception) if current_user && current_user.persisted? redirect_to root_path, alert: exception.message else session['user_return_to'.freeze] = request.url redirect_to new_user_session_path, alert: exception.message end end def find_work @work = CurationConcerns::WorkRelation.new.find(params[:id]) end end
Version data entries
4 entries across 4 versions & 1 rubygems