Class: InheritPermissionsJob

Inherits:
Hyrax::ApplicationJob show all
Defined in:
app/jobs/inherit_permissions_job.rb

Overview

A job to apply work permissions to all contained files set

Instance Method Summary collapse

Instance Method Details

#perform(work, use_valkyrie: :DEFAULT) ⇒ Object

Perform the copy from the work to the contained filesets

Parameters:

  • work

    containing access level and filesets

  • use_valkyrie (Boolean) (defaults to: :DEFAULT)

    whether to use valkyrie support (deprecated)


9
10
11
12
13
14
15
16
17
18
19
# File 'app/jobs/inherit_permissions_job.rb', line 9

def perform(work, use_valkyrie: :DEFAULT)
  Deprecation.warn("use_valkyrie argument is deprecated, behavior depends on deserialized resource") unless
    use_valkyrie == :DEFAULT

  case work
  when ActiveFedora::Base
    af_perform(work)
  else
    valkyrie_perform(work)
  end
end