Sha256: cce014f2576ed20577f7f3b59a7a12842972b70ac46c2ae4a7a892d2994eae99
Contents?: true
Size: 522 Bytes
Versions: 12
Compression:
Stored size: 522 Bytes
Contents
module Ddr::Jobs class MigrateLegacyAuthorization @queue = :migration SUMMARY = "Legacy authorization data migrated to roles" def self.perform(pid) obj = ActiveFedora::Base.find(pid) event_args = { pid: pid, summary: SUMMARY } begin event_args[:detail] = obj.legacy_authorization.migrate obj.save! rescue Exception => e event_args[:exception] = e raise e ensure Ddr::Events::UpdateEvent.create(event_args) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems