honor client context in IAM user/policy listing calls (#14682)

This commit is contained in:
polaris-megrez
2022-04-20 00:00:19 +08:00
committed by GitHub
parent 598ce1e354
commit 6bc3c74c0c
3 changed files with 35 additions and 21 deletions
+2 -2
View File
@@ -90,7 +90,7 @@ func (a adminAPIHandlers) ListBucketUsers(w http.ResponseWriter, r *http.Request
password := cred.SecretKey
allCredentials, err := globalIAMSys.ListBucketUsers(bucket)
allCredentials, err := globalIAMSys.ListBucketUsers(ctx, bucket)
if err != nil {
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
return
@@ -124,7 +124,7 @@ func (a adminAPIHandlers) ListUsers(w http.ResponseWriter, r *http.Request) {
password := cred.SecretKey
allCredentials, err := globalIAMSys.ListUsers()
allCredentials, err := globalIAMSys.ListUsers(ctx)
if err != nil {
writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
return