Class: Hyrax::ChangeContentDepositorService

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/change_content_depositor_service.rb

Class Method Summary collapse

Class Method Details

.call(work, user, reset) ⇒ Object

Set the given `user` as the depositor of the given `work`; If `reset` is true, first remove all previous permissions.

Parameters:

  • work (ActiveFedora::Base, Valkyrie::Resource)

    the work that is receiving a change of depositor

  • user (User)

    the user that will “become” the depositor of the given work

  • reset (TrueClass, FalseClass)

    when true, first clear permissions for the given work and contained file sets; regardless of true/false make the given user the depositor of the given work


15
16
17
18
19
20
21
22
# File 'app/services/hyrax/change_content_depositor_service.rb', line 15

def self.call(work, user, reset)
  case work
  when ActiveFedora::Base
    call_af(work, user, reset)
  when Valkyrie::Resource
    call_valkyrie(work, user, reset)
  end
end