Sha256: 49d5fa481ac3bfbe398cce983da7de0f2d1e09025cd8daf4a19e2d44d3f47915
Contents?: true
Size: 736 Bytes
Versions: 16
Compression:
Stored size: 736 Bytes
Contents
# frozen_string_literal: true module Hyrax module Actors # Notify the provided owner that their proxy wants to make a # deposit on their behalf class TransferRequestActor < AbstractActor # @param [Hyrax::Actors::Environment] env # @return [Boolean] true if create was successful def create(env) next_actor.create(env) && create_proxy_deposit_request(env) end private def create_proxy_deposit_request(env) proxy = env.curation_concern.on_behalf_of return true if proxy.blank? work = env.curation_concern user = ::User.find_by_user_key(proxy) Hyrax::ChangeDepositorService.call(work, user, false) true end end end end
Version data entries
16 entries across 16 versions & 1 rubygems