mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-09 21:38:19 +01:00
s3: read bucket owner and crtime from the entry-free bucket config
The owner index read the raw filer entry off BucketConfig, which no longer carries one. Cache Crtime alongside IdentityId, and pass the owner id rather than the entry through the ListBuckets visibility checks so the scan and granted-bucket paths share one implementation.
This commit is contained in:
1 parent
17af32f3ff
commit
98e49d2d42
3 files changed
+19
-28
No files matched your search
@@ -166,12 +166,12 @@ func (s3a *S3ApiServer) resolveGrantedBuckets(r *http.Request, identity *Identit
|
||||
}
|
||||
continue
|
||||
}
|
||||
if !s3a.bucketVisibleToIdentity(r, config.Entry, identity) {
|
||||
if !s3a.bucketVisibleToIdentity(r, name, config.IdentityId, identity) {
|
||||
continue
|
||||
}
|
||||
granted = append(granted, ListAllMyBucketsEntry{
|
||||
Name: name,
|
||||
CreationDate: time.Unix(config.Entry.Attributes.Crtime, 0).UTC(),
|
||||
CreationDate: time.Unix(config.Crtime, 0).UTC(),
|
||||
})
|
||||
}
|
||||
return granted
|
||||
|
||||
Reference in new issue
Block a user