Class: Hyrax::RevokeEditFromMembersJob

Inherits:
ApplicationJob
  • Object
show all
Includes:
MembersPermissionJobBehavior
Defined in:
app/jobs/hyrax/revoke_edit_from_members_job.rb

Overview

Revokes edit access for the supplied user for the members attached to a work

Instance Method Summary collapse

Instance Method Details

#perform(work, user_key) ⇒ Object

Parameters:



8
9
10
11
12
13
14
# File 'app/jobs/hyrax/revoke_edit_from_members_job.rb', line 8

def perform(work, user_key)
  # Iterate over ids because reifying objects is slow.
  file_set_ids(work).each do |file_set_id|
    # Call this synchronously, since we're already in a job
    RevokeEditJob.perform_now(file_set_id, user_key, use_valkyrie: use_valkyrie?(work))
  end
end