mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Add tags to NewerNoncurrentVersions audit event (#17110)
This commit is contained in:
committed by
GitHub
parent
4640b13c66
commit
0ec722bc54
@@ -25,6 +25,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio/internal/amztime"
|
||||
"github.com/minio/minio/internal/bucket/lifecycle"
|
||||
"github.com/minio/minio/internal/event"
|
||||
"github.com/minio/minio/internal/hash"
|
||||
xhttp "github.com/minio/minio/internal/http"
|
||||
@@ -343,7 +344,7 @@ func setPutObjHeaders(w http.ResponseWriter, objInfo ObjectInfo, delete bool) {
|
||||
hash.AddChecksumHeader(w, objInfo.decryptChecksums(0))
|
||||
}
|
||||
|
||||
func deleteObjectVersions(ctx context.Context, o ObjectLayer, bucket string, toDel []ObjectToDelete) {
|
||||
func deleteObjectVersions(ctx context.Context, o ObjectLayer, bucket string, toDel []ObjectToDelete, lcEvent lifecycle.Event) {
|
||||
for remaining := toDel; len(remaining) > 0; toDel = remaining {
|
||||
if len(toDel) > maxDeleteList {
|
||||
remaining = toDel[maxDeleteList:]
|
||||
@@ -373,8 +374,8 @@ func deleteObjectVersions(ctx context.Context, o ObjectLayer, bucket string, toD
|
||||
VersionID: dobj.VersionID,
|
||||
}
|
||||
traceFn := globalLifecycleSys.trace(oi)
|
||||
tags := make(map[string]interface{}, 1)
|
||||
tags["newer-noncurrent-versions"] = true
|
||||
tags := auditLifecycleTags(lcEvent)
|
||||
|
||||
// Send audit for the lifecycle delete operation
|
||||
auditLogLifecycle(
|
||||
ctx,
|
||||
|
||||
Reference in New Issue
Block a user