app/controllers/concerns/hyrax/manages_embargoes.rb in hyrax-3.6.0 vs app/controllers/concerns/hyrax/manages_embargoes.rb in hyrax-4.0.0.beta1
- old
+ new
@@ -4,28 +4,16 @@
extend ActiveSupport::Concern
included do
attr_accessor :curation_concern
helper_method :curation_concern
- base_class = Hyrax.config.use_valkyrie? ? Hyrax::Resource : ActiveFedora::Base
- load_and_authorize_resource class: base_class, instance_name: :curation_concern, except: [:index]
+ load_and_authorize_resource class: ActiveFedora::Base, instance_name: :curation_concern
end
# This is an override of Hyrax::ApplicationController
def deny_access(exception)
redirect_to root_path, alert: exception.message
end
def edit; end
-
- private
-
- def work_has_file_set_members?(work)
- case work
- when Valkyrie::Resource
- Hyrax.custom_queries.find_child_file_set_ids(resource: work).any?
- else
- work.file_sets.present?
- end
- end
end
end