mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: add missing delete marker created filter (#10481)
This commit is contained in:
parent
34859c6d4b
commit
0ee9678190
@ -1232,7 +1232,7 @@ func (args eventArgs) ToEvent(escape bool) event.Event {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if args.EventName != event.ObjectRemovedDelete {
|
if args.EventName != event.ObjectRemovedDelete && args.EventName != event.ObjectRemovedDeleteMarkerCreated {
|
||||||
newEvent.S3.Object.ETag = args.Object.ETag
|
newEvent.S3.Object.ETag = args.Object.ETag
|
||||||
newEvent.S3.Object.Size = args.Object.Size
|
newEvent.S3.Object.Size = args.Object.Size
|
||||||
newEvent.S3.Object.ContentType = args.Object.ContentType
|
newEvent.S3.Object.ContentType = args.Object.ContentType
|
||||||
|
@ -56,12 +56,21 @@ func (name Name) Expand() []Name {
|
|||||||
case BucketRemoved:
|
case BucketRemoved:
|
||||||
return []Name{BucketRemoved}
|
return []Name{BucketRemoved}
|
||||||
case ObjectAccessedAll:
|
case ObjectAccessedAll:
|
||||||
return []Name{ObjectAccessedGet, ObjectAccessedHead, ObjectAccessedGetRetention, ObjectAccessedGetLegalHold}
|
return []Name{
|
||||||
|
ObjectAccessedGet, ObjectAccessedHead,
|
||||||
|
ObjectAccessedGetRetention, ObjectAccessedGetLegalHold,
|
||||||
|
}
|
||||||
case ObjectCreatedAll:
|
case ObjectCreatedAll:
|
||||||
return []Name{ObjectCreatedCompleteMultipartUpload, ObjectCreatedCopy,
|
return []Name{
|
||||||
ObjectCreatedPost, ObjectCreatedPut, ObjectCreatedPutRetention, ObjectCreatedPutLegalHold}
|
ObjectCreatedCompleteMultipartUpload, ObjectCreatedCopy,
|
||||||
|
ObjectCreatedPost, ObjectCreatedPut,
|
||||||
|
ObjectCreatedPutRetention, ObjectCreatedPutLegalHold,
|
||||||
|
}
|
||||||
case ObjectRemovedAll:
|
case ObjectRemovedAll:
|
||||||
return []Name{ObjectRemovedDelete}
|
return []Name{
|
||||||
|
ObjectRemovedDelete,
|
||||||
|
ObjectRemovedDeleteMarkerCreated,
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return []Name{name}
|
return []Name{name}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ func TestNameExpand(t *testing.T) {
|
|||||||
{ObjectAccessedAll, []Name{ObjectAccessedGet, ObjectAccessedHead, ObjectAccessedGetRetention, ObjectAccessedGetLegalHold}},
|
{ObjectAccessedAll, []Name{ObjectAccessedGet, ObjectAccessedHead, ObjectAccessedGetRetention, ObjectAccessedGetLegalHold}},
|
||||||
{ObjectCreatedAll, []Name{ObjectCreatedCompleteMultipartUpload, ObjectCreatedCopy,
|
{ObjectCreatedAll, []Name{ObjectCreatedCompleteMultipartUpload, ObjectCreatedCopy,
|
||||||
ObjectCreatedPost, ObjectCreatedPut, ObjectCreatedPutRetention, ObjectCreatedPutLegalHold}},
|
ObjectCreatedPost, ObjectCreatedPut, ObjectCreatedPutRetention, ObjectCreatedPutLegalHold}},
|
||||||
{ObjectRemovedAll, []Name{ObjectRemovedDelete}},
|
{ObjectRemovedAll, []Name{ObjectRemovedDelete, ObjectRemovedDeleteMarkerCreated}},
|
||||||
{ObjectAccessedHead, []Name{ObjectAccessedHead}},
|
{ObjectAccessedHead, []Name{ObjectAccessedHead}},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user