fix: add name and description to ldap accesskey list (#21511)

This commit is contained in:
jiuker 2025-08-08 10:46:04 +08:00 committed by GitHub
parent 0638ccc5f3
commit a8abdc797e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -445,8 +445,10 @@ func (a adminAPIHandlers) ListAccessKeysLDAP(w http.ResponseWriter, r *http.Requ
for _, svc := range serviceAccounts { for _, svc := range serviceAccounts {
expiryTime := svc.Expiration expiryTime := svc.Expiration
serviceAccountList = append(serviceAccountList, madmin.ServiceAccountInfo{ serviceAccountList = append(serviceAccountList, madmin.ServiceAccountInfo{
AccessKey: svc.AccessKey, AccessKey: svc.AccessKey,
Expiration: &expiryTime, Expiration: &expiryTime,
Name: svc.Name,
Description: svc.Description,
}) })
} }
for _, sts := range stsKeys { for _, sts := range stsKeys {
@ -625,8 +627,10 @@ func (a adminAPIHandlers) ListAccessKeysLDAPBulk(w http.ResponseWriter, r *http.
} }
for _, svc := range serviceAccounts { for _, svc := range serviceAccounts {
accessKeys.ServiceAccounts = append(accessKeys.ServiceAccounts, madmin.ServiceAccountInfo{ accessKeys.ServiceAccounts = append(accessKeys.ServiceAccounts, madmin.ServiceAccountInfo{
AccessKey: svc.AccessKey, AccessKey: svc.AccessKey,
Expiration: &svc.Expiration, Expiration: &svc.Expiration,
Name: svc.Name,
Description: svc.Description,
}) })
} }
// if only service accounts, skip if user has no service accounts // if only service accounts, skip if user has no service accounts