Verified Commit 6b3d3917 authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Fix : Added audit event for delivery, destruction and restitution

parent 63656ecc
......@@ -394,6 +394,9 @@ class ArchiveDeliveryRequest extends abstractMessage
$archives[] = $this->archiveController->communicate($unitIdentifier->objectId);
}
$logMessage = ["message" => "%s archives are communicated", "variables"=> count($archives)];
\laabs::notify(\bundle\audit\AUDIT_ENTRY_OUTPUT, $logMessage);
try {
$archiveDeliveryRequestReplyController = \laabs::newController('medona/ArchiveDeliveryRequestReply');
$archiveDeliveryRequestReplyController->send($message, $archives, $replyCode);
......
......@@ -294,6 +294,9 @@ class ArchiveDestructionRequest extends abstractMessage
try {
$archives = $this->archiveController->destruct($archiveIds);
$logMessage = ["message" => "%s archives are deleted", "variables"=> count($archives)];
\laabs::notify(\bundle\audit\AUDIT_ENTRY_OUTPUT, $logMessage);
$message->status = "processed";
$message->operationDate = \laabs::newDatetime(null, "UTC");
......
......@@ -370,6 +370,9 @@ class ArchiveRestitutionRequest extends abstractMessage
$archives[] = $archive;
}
$logMessage = ["message" => "%s archives are restituted", "variables"=> count($archives)];
\laabs::notify(\bundle\audit\AUDIT_ENTRY_OUTPUT, $logMessage);
try {
$archiveRestitutionController = \laabs::newController('medona/ArchiveRestitution');
$archiveRestitutionController->send($message, $archives);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment