simplify bucket metadata lookups for versioning/object locking (#17253)

This commit is contained in:
Harshavardhana
2023-05-22 12:05:14 -07:00
committed by GitHub
parent b1b00a5055
commit fc03be7891
5 changed files with 21 additions and 8 deletions

View File

@@ -1627,8 +1627,8 @@ func (z *erasureServerPools) GetBucketInfo(ctx context.Context, bucket string, o
meta, err := globalBucketMetadataSys.Get(bucket)
if err == nil {
bucketInfo.Created = meta.Created
bucketInfo.Versioning = meta.LockEnabled || globalBucketVersioningSys.Enabled(bucket)
bucketInfo.ObjectLocking = meta.LockEnabled
bucketInfo.Versioning = meta.Versioning()
bucketInfo.ObjectLocking = meta.ObjectLocking()
}
return bucketInfo, nil
}