java.util.Set authzGroupIds = authzGroupService.getAuthzGroupsIsAllowed(userId, "tool.permission", null); java.util.Iterator it = authzGroupIds.iterator(); while (it.hasNext()) {
String authzGroupId = (String) it.next();
Reference r = entityManager.newReference(authzGroupId); if(r.isKnownType()) {
if(r.getType().equals(SiteService.APPLICATION_ID)) { String siteId = r.getId();
String context = r.getId();
try {
Site site = siteService.getSite(siteId);
} catch (IdUnusedException e) {
throw new RuntimeException("Could not get site from siteId:" + siteId);
}
} else if (r.getType().equals(SiteService.GROUP_SUBTYPE)) { String groupId = r.getId();
String context = r.getId();
Group group = siteService.findGroup(groupId);
if (group != null) {
}
}
}
}