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.9.6 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.9.5 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.9.4 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.9.3 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.9.2 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.9.1 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.9.0 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.8.0 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.7.2 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.7.1 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.7.0 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.6.0 app/services/hyrax/change_content_depositor_service.rb
hyrax-3.0.0.pre.rc1 app/services/hyrax/change_content_depositor_service.rb
hyrax-3.0.0.pre.beta3 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.5.1 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.5.0 app/services/hyrax/change_content_depositor_service.rb
hyrax-3.0.0.pre.beta2 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.4.1 app/services/hyrax/change_content_depositor_service.rb
hyrax-3.0.0.pre.beta1 app/services/hyrax/change_content_depositor_service.rb
hyrax-2.4.0 app/services/hyrax/change_content_depositor_service.rb