mirror of
https://github.com/minio/minio.git
synced 2025-04-23 11:55:47 -04:00
Fix ignoring claims in list buckets call (#8118)
This commit is contained in:
parent
add1b6cb6b
commit
cd03bfb3cf
@ -288,6 +288,9 @@ func (api objectAPIHandlers) ListBucketsHandler(w http.ResponseWriter, r *http.R
|
|||||||
// Set delimiter value for "s3:delimiter" policy conditionals.
|
// Set delimiter value for "s3:delimiter" policy conditionals.
|
||||||
r.Header.Set("delimiter", SlashSeparator)
|
r.Header.Set("delimiter", SlashSeparator)
|
||||||
|
|
||||||
|
// err will be nil here as we already called this function
|
||||||
|
// earlier in this request.
|
||||||
|
claims, _ := getClaimsFromToken(r)
|
||||||
var newBucketsInfo []BucketInfo
|
var newBucketsInfo []BucketInfo
|
||||||
for _, bucketInfo := range bucketsInfo {
|
for _, bucketInfo := range bucketsInfo {
|
||||||
if globalIAMSys.IsAllowed(iampolicy.Args{
|
if globalIAMSys.IsAllowed(iampolicy.Args{
|
||||||
@ -297,6 +300,7 @@ func (api objectAPIHandlers) ListBucketsHandler(w http.ResponseWriter, r *http.R
|
|||||||
ConditionValues: getConditionValues(r, "", accessKey),
|
ConditionValues: getConditionValues(r, "", accessKey),
|
||||||
IsOwner: owner,
|
IsOwner: owner,
|
||||||
ObjectName: "",
|
ObjectName: "",
|
||||||
|
Claims: claims,
|
||||||
}) {
|
}) {
|
||||||
newBucketsInfo = append(newBucketsInfo, bucketInfo)
|
newBucketsInfo = append(newBucketsInfo, bucketInfo)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user