ObjectNode groupsNode = null;
if (namespaceConfig.getGroupsPath() != null && namespaceConfig.getGroupsPath().length() != 0) {
groupsUri = namespace.getUri(token, namespaceConfig.getGroupsPath());
groupsNode = groupsUri.getStore().retrieveObject(groupsUri);
if (groupsNode != null) {
Enumeration groupsEnum = groupsNode.enumerateBindings();
while (groupsEnum.hasMoreElements()) {
ObjectNode.Binding b = (ObjectNode.Binding)groupsEnum.nextElement();
String group = b.getName();
if (hasRole(token, subjectNode, group)) {
result.add(group);