diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index 9800e1671..e65772872 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -1624,10 +1624,7 @@ func (api objectAPIHandlers) PutBucketReplicationConfigHandler(w http.ResponseWr writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } - if globalSiteReplicationSys.isEnabled() { - writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrReplicationDenyEditError), r.URL) - return - } + if versioned := globalBucketVersioningSys.Enabled(bucket); !versioned { writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrReplicationNeedsVersioningError), r.URL) return