mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: user listing with LDAP (#13872)
Users listing was showing just a weird policy mapping output which does not make sense here.
This commit is contained in:
parent
2f1e8ba612
commit
85d2df02b9
@ -1099,15 +1099,6 @@ func (store *IAMStoreSys) GetUsers() map[string]madmin.UserInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if store.getUsersSysType() == LDAPUsersSysType {
|
|
||||||
for k, v := range cache.iamUserPolicyMap {
|
|
||||||
result[k] = madmin.UserInfo{
|
|
||||||
PolicyName: v.Policies,
|
|
||||||
Status: madmin.AccountEnabled,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,6 +297,15 @@ func (s *TestSuiteIAM) TestLDAPSTS(c *check) {
|
|||||||
c.Fatalf("Error initializing client: %v", err)
|
c.Fatalf("Error initializing client: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Validate that user listing does not return any entries
|
||||||
|
usersList, err := s.adm.ListUsers(ctx)
|
||||||
|
if err != nil {
|
||||||
|
c.Fatalf("list users should not fail: %v", err)
|
||||||
|
}
|
||||||
|
if len(usersList) > 0 {
|
||||||
|
c.Fatalf("expected listing to be empty: %v", usersList)
|
||||||
|
}
|
||||||
|
|
||||||
// Validate that the client from sts creds can access the bucket.
|
// Validate that the client from sts creds can access the bucket.
|
||||||
c.mustListObjects(ctx, minioClient, bucket)
|
c.mustListObjects(ctx, minioClient, bucket)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user