Sha256: e1efc2e8cebec770be51eb090e562c394813f31ca74ac7d15a535ac81c3e4d0f

Contents?: true

Size: 671 Bytes

Versions: 48

Compression:

Stored size: 671 Bytes

Contents

module Hyrax
  module Workflow
    # This is a built in function for workflow, so that a workflow action can be created that
    # grants the creator the ability to alter it.
    module GrantEditToDepositor
      # @param [#read_users=, #read_users] target (likely an ActiveRecord::Base) to which we are adding edit_users for the depositor
      # @return void
      def self.call(target:, **)
        target.edit_users += [target.depositor]
        # If there are a lot of members, granting access to each could take a
        # long time. Do this work in the background.
        GrantEditToMembersJob.perform_later(target, target.depositor)
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

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