Hi, the challange with this will be, that you can filter all the necessary groups. The result will include all the different role groups. Probably you need to get the repository or the base dn to get the groups you are looking for.
Björn
WTPrincipal prince = SessionHelper.manager.getPrincipal();
logger.debug("prince = " + prince);
Enumeration e = OrganizationServicesHelper.manager.parentGroups(prince, false);
while (e.hasMoreElements()) {
WTPrincipalReference o = (WTPrincipalReference)e.nextElement();
WTPrincipal localPrince = o.getPrincipal();
logger.debug("localPrince = " + localPrince.getClass().getName());
if (localPrince instanceof WTGroup) {
WTGroup group = (WTGroup) localPrince;
logger.debug("Group = " + group.getName());
}
}