public Map < String , User > getUsers ( LDAPConnection ldapConnection ) throws GuacamoleException { // Retrieve all visible user objects Collection < String > attributes = confService . getUsernameAttributes ( ) ; List < LDAPEntry > results = queryService . search ( ldapConnection , confService . getUserBaseDN ( ) , confService . getUserSearchFilter ( ) , attributes , null ) ; // Convert retrieved users to map of identifier to Guacamole user object return queryService . asMap ( results , entry -> { // Get username from record String username = queryService . getIdentifier ( entry , attributes ) ; if ( username == null ) { logger . warn ( "User \"{}\" is missing a username attribute " + "and will be ignored." , entry . getDN ( ) ) ; return null ; } return new SimpleUser ( username ) ; } ) ; }
Returns all Guacamole users accessible to the user currently bound under the given LDAP connection .