public List < LDAPEntry > getParentUserGroupEntries ( LDAPConnection ldapConnection , String userDN ) throws GuacamoleException { // Do not return any user groups if base DN is not specified String groupBaseDN = confService . getGroupBaseDN ( ) ; if ( groupBaseDN == null ) return Collections . emptyList ( ) ; // Get all groups the user is a member of starting at the groupBaseDN, // excluding guacConfigGroups return queryService . search ( ldapConnection , groupBaseDN , getGroupSearchFilter ( ) , Collections . singleton ( confService . getMemberAttribute ( ) ) , userDN ) ; }
Returns the LDAP entries representing all user groups that the given user is a member of . Only user groups which are readable by the current user will be retrieved .