Sha256: 7d28bbfaa95de322b8fb58c6fed691558336e5d0b47b7b207e2f0aed8774db68

Contents?: true

Size: 557 Bytes

Versions: 7

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Workflow
    # This is a built in function for workflow, so that a workflow action can be created that
    # removes the creators the ability to alter it.
    module RevokeEditFromDepositor
      def self.call(target:, **)
        target.edit_users -= [target.depositor]
        # If there are a lot of members, revoking access from each could take a
        # long time. Do this work in the background.
        RevokeEditFromMembersJob.perform_later(target, target.depositor)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hyrax-3.1.0 app/services/hyrax/workflow/revoke_edit_from_depositor.rb
hyrax-3.0.2 app/services/hyrax/workflow/revoke_edit_from_depositor.rb
hyrax-3.0.1 app/services/hyrax/workflow/revoke_edit_from_depositor.rb
hyrax-3.0.0 app/services/hyrax/workflow/revoke_edit_from_depositor.rb
hyrax-3.0.0.pre.rc4 app/services/hyrax/workflow/revoke_edit_from_depositor.rb
hyrax-3.0.0.pre.rc3 app/services/hyrax/workflow/revoke_edit_from_depositor.rb
hyrax-3.0.0.pre.rc2 app/services/hyrax/workflow/revoke_edit_from_depositor.rb