As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
function getUserGroup(person) { // person is a Person Node var containerGroups = people.getContainerGroups(person); var group = containerGroups[0].getQnamePath() var p = group.split(":"); return p[p.length-1]; }
var userName = "admin"; var user = people.getPerson(userName); var model.groups = people.getContainerGroups(user);
<#list groups as group> { "id": "${group.name?js_string}", "nodeRef": "${group.nodeRef?js_string}", "qnamePath": "${group.qnamePath?js_string}", "displayPath": "${group.displayPath?js_string}", "url": "${group.url?js_string}", "parentNodeRef": "${group.parent.nodeRef?js_string}" }<#if group_has_next>,</#if> </#list>
… { "id": "2c11331f-2897-4fbb-9114-4424dffe5002", "nodeRef": "user://alfrescoUserStore/2c11331f-2897-4fbb-9114-4424dffe5002", "qnamePath": "/sys:system/sys:authorities/usr:GROUP_group1/usr:GROUP_group1.1", "displayPath": "/94cace60-351a-4e14-87a4-73321b9c9c9d/9bdfa029-0973-48e5-88fb-3aa0ab21e94c/5b44c49b-d9ce-4142-97bf-16c2090bcdac", "url": "/n/browse/user/alfrescoUserStore/2c11331f-2897-4fbb-9114-4424dffe5002", "parentNodeRef": "user://alfrescoUserStore/5b44c49b-d9ce-4142-97bf-16c2090bcdac" } …