Sha256: fc4c4d5a6e5c61da414f944ae1552d9e86d5f8a0f02f8224036d0d935750dd5a

Contents?: true

Size: 547 Bytes

Versions: 1

Compression:

Stored size: 547 Bytes

Contents

module CurationConcerns
  module Actors
    # Grants edit access to the depositor.  This is implemented as a separate actor,
    # so that it can be removed from the stack in cases where the depositor should not
    # have edit access (e.g. mediated deposit)
    class GrantEditToDepositorActor < AbstractActor
      def create(attributes)
        grant_edit_access
        next_actor.create(attributes)
      end

      private

        def grant_edit_access
          curation_concern.edit_users += [user.user_key]
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
curation_concerns-1.7.0.beta1 app/actors/curation_concerns/actors/grant_edit_to_depositor_actor.rb