diff --git a/cmd/admin-handlers-users.go b/cmd/admin-handlers-users.go index 43de2bdb8..c1873cc15 100644 --- a/cmd/admin-handlers-users.go +++ b/cmd/admin-handlers-users.go @@ -1105,6 +1105,19 @@ func (a adminAPIHandlers) AccountInfoHandler(w http.ResponseWriter, r *http.Requ rd = true } + if globalIAMSys.IsAllowed(iampolicy.Args{ + AccountName: cred.AccessKey, + Groups: cred.Groups, + Action: iampolicy.GetBucketLocationAction, + BucketName: bucketName, + ConditionValues: getConditionValues(r, "", cred.AccessKey, claims), + IsOwner: owner, + ObjectName: "", + Claims: claims, + }) { + rd = true + } + if globalIAMSys.IsAllowed(iampolicy.Args{ AccountName: cred.AccessKey, Groups: cred.Groups, diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index 60e3c09f3..9800e1671 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -364,6 +364,18 @@ func (api objectAPIHandlers) ListBucketsHandler(w http.ResponseWriter, r *http.R }) { bucketsInfo[n] = bucketInfo n++ + } else if globalIAMSys.IsAllowed(iampolicy.Args{ + AccountName: cred.AccessKey, + Groups: cred.Groups, + Action: iampolicy.GetBucketLocationAction, + BucketName: bucketInfo.Name, + ConditionValues: getConditionValues(r, "", cred.AccessKey, cred.Claims), + IsOwner: owner, + ObjectName: "", + Claims: cred.Claims, + }) { + bucketsInfo[n] = bucketInfo + n++ } } bucketsInfo = bucketsInfo[:n]