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.3.3 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.3.2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.3.1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.3.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.0.3 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.2.4 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.2.3 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.2.2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.2.1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.2.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.1.0 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.1.0.rc4 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.1.0.rc3 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.1.0.rc2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.1.0.rc1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.1.0.beta2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.0.2 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.1.0.beta1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.0.1 app/actors/hyrax/actors/transfer_request_actor.rb
hyrax-2.0.0 app/actors/hyrax/actors/transfer_request_actor.rb