mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
remove s3:ReplicateDelete permission check from DeleteObject APIs (#13220)
This commit is contained in:
parent
f98f115ac2
commit
78dc08bdc2
@ -520,13 +520,6 @@ func (api objectAPIHandlers) DeleteMultipleObjectsHandler(w http.ResponseWriter,
|
|||||||
}, goi, gerr)
|
}, goi, gerr)
|
||||||
replicateSync = repsync
|
replicateSync = repsync
|
||||||
if replicate {
|
if replicate {
|
||||||
if apiErrCode := checkRequestAuthType(ctx, r, policy.ReplicateDeleteAction, bucket, object.ObjectName); apiErrCode != ErrNone {
|
|
||||||
if apiErrCode == ErrSignatureDoesNotMatch || apiErrCode == ErrInvalidAccessKeyID {
|
|
||||||
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(apiErrCode), r.URL)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if object.VersionID != "" {
|
if object.VersionID != "" {
|
||||||
object.VersionPurgeStatus = Pending
|
object.VersionPurgeStatus = Pending
|
||||||
} else {
|
} else {
|
||||||
|
@ -3295,11 +3295,6 @@ func (api objectAPIHandlers) DeleteObjectHandler(w http.ResponseWriter, r *http.
|
|||||||
|
|
||||||
vID := opts.VersionID
|
vID := opts.VersionID
|
||||||
if r.Header.Get(xhttp.AmzBucketReplicationStatus) == replication.Replica.String() {
|
if r.Header.Get(xhttp.AmzBucketReplicationStatus) == replication.Replica.String() {
|
||||||
// check if replica has permission to be deleted.
|
|
||||||
if apiErrCode := checkRequestAuthType(ctx, r, policy.ReplicateDeleteAction, bucket, object); apiErrCode != ErrNone {
|
|
||||||
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(apiErrCode), r.URL)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
opts.DeleteMarkerReplicationStatus = replication.Replica.String()
|
opts.DeleteMarkerReplicationStatus = replication.Replica.String()
|
||||||
if opts.VersionPurgeStatus.Empty() {
|
if opts.VersionPurgeStatus.Empty() {
|
||||||
// opts.VersionID holds delete marker version ID to replicate and not yet present on disk
|
// opts.VersionID holds delete marker version ID to replicate and not yet present on disk
|
||||||
|
Loading…
Reference in New Issue
Block a user