mirror of
https://github.com/minio/minio.git
synced 2025-11-13 07:11:44 -05:00
web: Handle private bucket match from prefix to exact match.
Filter out 'privateBucket' if any from listBuckets output.
This commit is contained in:
@@ -174,10 +174,13 @@ func (web *webAPI) ListBuckets(r *http.Request, args *ListBucketsArgs, reply *Li
|
||||
return &json2.Error{Message: e.Error()}
|
||||
}
|
||||
for _, bucket := range buckets {
|
||||
reply.Buckets = append(reply.Buckets, BucketInfo{
|
||||
Name: bucket.Name,
|
||||
CreationDate: bucket.CreationDate,
|
||||
})
|
||||
// List all buckets which are not private.
|
||||
if bucket.Name != privateBucket {
|
||||
reply.Buckets = append(reply.Buckets, BucketInfo{
|
||||
Name: bucket.Name,
|
||||
CreationDate: bucket.CreationDate,
|
||||
})
|
||||
}
|
||||
}
|
||||
reply.UIVersion = uiVersion
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user