mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
Fix bug preventing overwrite of object if (#8796)
object lock config is enabled for a bucket. Creating a bucket with object lock configuration enabled does not automatically cause WORM protection to be applied. PUT operation needs to specifically request object locking or bucket has to have default retention settings configured. Fixes regression introduced in #8657
This commit is contained in:
@@ -579,12 +579,9 @@ func iamPolicyClaimName() string {
|
||||
return globalOpenIDConfig.ClaimPrefix + globalOpenIDConfig.ClaimName
|
||||
}
|
||||
|
||||
func isWORMEnabled(bucket string) (Retention, bool) {
|
||||
func isWORMEnabled(bucket string) bool {
|
||||
if isMinioMetaBucketName(bucket) {
|
||||
return Retention{}, false
|
||||
return false
|
||||
}
|
||||
if globalWORMEnabled {
|
||||
return Retention{}, true
|
||||
}
|
||||
return globalBucketObjectLockConfig.Get(bucket)
|
||||
return globalWORMEnabled
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user