web: Handle private bucket match from prefix to exact match.

Filter out 'privateBucket' if any from listBuckets output.
This commit is contained in:
Harshavardhana
2016-02-19 21:45:37 -08:00
parent 185d29a899
commit 91a7b13529
2 changed files with 18 additions and 18 deletions

View File

@@ -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