code: 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
          );
  
      }
docs: 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.
  
  @param ldapConnection
  The current connection to the LDAP server, associated with the
  current user.
  
  @param userDN
  The DN of the user whose group membership should be retrieved.
  
  @return
  The LDAP entries representing all readable parent user groups of the
  user having the given DN.
  
  @throws GuacamoleException
  If an error occurs preventing retrieval of user groups.