mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
Bring back listing LDAP users temporarly (#14760)
In previous releases, mc admin user list would return the list of users that have policies mapped in IAM database. However, this was removed but this commit will bring it back until we revamp this.
This commit is contained in:
@@ -1184,6 +1184,18 @@ func (store *IAMStoreSys) GetUsers() map[string]madmin.UserInfo {
|
||||
return result
|
||||
}
|
||||
|
||||
// GetUsersWithMappedPolicies - safely returns the name of access keys with associated policies
|
||||
func (store *IAMStoreSys) GetUsersWithMappedPolicies() map[string]string {
|
||||
cache := store.rlock()
|
||||
defer store.runlock()
|
||||
|
||||
result := make(map[string]string)
|
||||
for k, v := range cache.iamUserPolicyMap {
|
||||
result[k] = v.Policies
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// GetUserInfo - get info on a user.
|
||||
func (store *IAMStoreSys) GetUserInfo(name string) (u madmin.UserInfo, err error) {
|
||||
if name == "" {
|
||||
|
||||
Reference in New Issue
Block a user