03-14-2016 07:43 AM
GET /alfresco/s/api/people/{userName}?groups=true
to get the groups the user is a member of, but it doesn't return site groups such as GROUP_site_{sitename}_SiteContributor. Could I somehow modify this request to also get all site groups of the user?GET /alfresco/s/api/people/{userid}/sites?size={pagesize?}&pos={position?}&roles={roles?}
which lists sites the user is an explicit member of, but this doesn't return the exact member roles/groups of {userid}. Could I perhaps use the roles-parameter to find this out? I have learned that using roles=user I can get the site roles of the user making the request, but I want to find out the site roles of {userid}. GET /alfresco/s/api/sites/{shortname}/memberships/{authorityname}
, but using this I would have to loop through all the sites to get the list of all site roles of a user, which doesn't seem a nice solution.03-15-2016 02:27 AM
03-15-2016 09:20 AM
/alfresco/s/api/people/{userid}/sites?size={pagesize?}&pos={position?}&roles={roles?}
and manually create group name with site short name and site role. However I don't know how to get the site role information of {userid} by using this script. By default the result doesn't include that.03-16-2016 02:35 AM
[
{
"url": "\/alfresco\/s\/api\/sites\/swsdp",
"sitePreset": "site-dashboard",
"shortName": "swsdp",
"title": "Sample: Web Site Design Project",
"description": "This is a Sample Alfresco Team site.",
"node": "\/alfresco\/s\/api\/node\/workspace\/SpacesStore\/b4cff62a-664d-4d45-9302-98723eac1319",
"tagScope": "\/alfresco\/s\/api\/tagscopes\/workspace\/SpacesStore\/b4cff62a-664d-4d45-9302-98723eac1319",
"siteRole": "SiteManager",
"isPublic": true,
"visibility": "PUBLIC"
}
,
{
"url": "\/alfresco\/s\/api\/sites\/test",
"sitePreset": "site-dashboard",
"shortName": "test",
"title": "test",
"description": "",
"node": "\/alfresco\/s\/api\/node\/workspace\/SpacesStore\/ed4aabe5-0682-4367-8fc9-1afac3863ad6",
"tagScope": "\/alfresco\/s\/api\/tagscopes\/workspace\/SpacesStore\/ed4aabe5-0682-4367-8fc9-1afac3863ad6",
"siteRole": "SiteManager",
"isPublic": true,
"visibility": "PUBLIC"
}
]
03-16-2016 04:00 AM
03-16-2016 09:27 AM
final Set<String> authorities = this.serviceRegistry.getAuthorityService().getContainingAuthoritiesInZone(AuthorityType.GROUP, userid, null, null, 1000);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.