mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Disallow delete replication for tag based rules (#14167)
This commit is contained in:
@@ -153,6 +153,7 @@ var (
|
||||
errDeleteReplicationMissing = Errorf("Delete replication must be specified")
|
||||
errInvalidDeleteReplicationStatus = Errorf("Delete replication is either enable|disable")
|
||||
errInvalidExistingObjectReplicationStatus = Errorf("Existing object replication status is invalid")
|
||||
errTagsDeleteMarkerReplicationDisallowed = Errorf("Delete marker replication is not supported if any Tag filter is specified")
|
||||
)
|
||||
|
||||
// validateID - checks if ID is valid or not.
|
||||
@@ -239,6 +240,9 @@ func (r Rule) Validate(bucket string, sameTarget bool) error {
|
||||
if r.Destination.Bucket == bucket && sameTarget {
|
||||
return errDestinationSourceIdentical
|
||||
}
|
||||
if !r.Filter.Tag.IsEmpty() && (r.DeleteMarkerReplication.Status == Enabled) {
|
||||
return errTagsDeleteMarkerReplicationDisallowed
|
||||
}
|
||||
return r.ExistingObjectReplication.Validate()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user