Sha256: 2bcd2feb014bb06c7ea72bbc69c00c4230d6fe395982d96d14c6d4803dd89457

Contents?: true

Size: 464 Bytes

Versions: 58

Compression:

Stored size: 464 Bytes

Contents

module Hyrax
  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

58 entries across 58 versions & 2 rubygems

Version Path
hyrax-2.0.1 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.rc3 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.rc2 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.rc1 app/services/hyrax/change_content_depositor_service.rb
hyrax-1.0.5 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.beta5 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.beta4 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.beta3 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.beta2 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.0.0.beta1 app/services/hyrax/change_content_depositor_service.rb
hyrax-1.0.4 app/services/hyrax/change_content_depositor_service.rb
hyrax-1.0.3 app/services/hyrax/change_content_depositor_service.rb
hyrax-1.0.2 app/services/hyrax/change_content_depositor_service.rb
hyrax-1.0.1 app/services/hyrax/change_content_depositor_service.rb
hyrax-1.0.0.rc2 app/services/hyrax/change_content_depositor_service.rb
hyrax-1.0.0.rc1 app/services/hyrax/change_content_depositor_service.rb
test_hyrax-0.0.1.alpha app/services/hyrax/change_content_depositor_service.rb