Sha256: 5201daf72e728c586c19da821a4af553321237430505a68b48ce66ce0caf0414

Contents?: true

Size: 736 Bytes

Versions: 44

Compression:

Stored size: 736 Bytes

Contents

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?
          ContentDepositorChangeEventJob.perform_later(env.curation_concern,
                                                       ::User.find_by_user_key(proxy))
          true
        end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.9.5 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.9.4 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.9.3 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.9.2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.9.1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.9.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.8.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.7.2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.7.1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.7.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.6.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-3.0.0.pre.rc1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-3.0.0.pre.beta3 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.5.1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.5.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-3.0.0.pre.beta2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.4.1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-3.0.0.pre.beta1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.4.0 app/actors/hyrax/actors/transfer_request_actor.rb