Sha256: 4305f1438bf1a042c8f3f4b1ab6baf57cca2e16a82f7c4f567d7099270a3578e

Contents?: true

Size: 464 Bytes

Versions: 16

Compression:

Stored size: 464 Bytes

Contents

module Sufia
  class ChangeContentDepositorService
    # @param [ActiveFedora::Base] work
    # @param [User] user
    # @param [TrueClass, FalseClass] reset
    def self.call(work, user, reset)
      work.proxy_depositor = work.depositor
      work.permissions = [] if reset
      work.apply_depositor_metadata(user)
      work.file_sets.each do |f|
        f.apply_depositor_metadata(user)
        f.save!
      end
      work.save!
      work
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sufia-7.4.1 app/services/sufia/change_content_depositor_service.rb
sufia-7.4.0 app/services/sufia/change_content_depositor_service.rb
sufia-7.3.1 app/services/sufia/change_content_depositor_service.rb
sufia-7.3.0 app/services/sufia/change_content_depositor_service.rb
sufia-7.3.0.rc3 app/services/sufia/change_content_depositor_service.rb
sufia-7.3.0.rc2 app/services/sufia/change_content_depositor_service.rb
sufia-7.3.0.rc1 app/services/sufia/change_content_depositor_service.rb
sufia-7.2.0 app/services/sufia/change_content_depositor_service.rb
sufia-7.1.0 app/services/sufia/change_content_depositor_service.rb
sufia-7.0.0 app/services/sufia/change_content_depositor_service.rb
sufia-7.0.0.rc2 app/services/sufia/change_content_depositor_service.rb
sufia-7.0.0.rc1 app/services/sufia/change_content_depositor_service.rb
sufia-7.0.0.beta4 app/services/sufia/change_content_depositor_service.rb
sufia-7.0.0.beta3 app/services/sufia/change_content_depositor_service.rb
sufia-7.0.0.beta2 app/services/sufia/change_content_depositor_service.rb
sufia-7.0.0.beta1 app/services/sufia/change_content_depositor_service.rb