From 5fe1b46bfd632efbac7c9328ffbd913abb3d1a1b Mon Sep 17 00:00:00 2001 From: Shubhendu Date: Tue, 4 Apr 2023 00:28:04 +0530 Subject: [PATCH] Enabled to send audit log while version deletion (#16954) Signed-off-by: Shubhendu Ram Tripathi --- cmd/object-handlers-common.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/object-handlers-common.go b/cmd/object-handlers-common.go index 58a9d6106..49d7bfcf7 100644 --- a/cmd/object-handlers-common.go +++ b/cmd/object-handlers-common.go @@ -367,6 +367,16 @@ func deleteObjectVersions(ctx context.Context, o ObjectLayer, bucket string, toD continue } dobj := deletedObjs[i] + // Send audit for the lifecycle delete operation + auditLogLifecycle( + ctx, + ObjectInfo{ + Bucket: bucket, + Name: dobj.ObjectName, + VersionID: dobj.VersionID, + }, + ILMExpiry) + sendEvent(eventArgs{ EventName: event.ObjectRemovedDelete, BucketName: bucket,