cancel
Showing results for 
Search instead for 
Did you mean: 

Different landing pages in Share based on groups

haffi67
Champ in-the-making
Champ in-the-making
Hi,

I'd like to customize the landing page of Share users, so they go straight to the document library of a site instead of their dashboard, and this could be done based on the group the user is in (that is, a user in group A goes to the document library at site A, a user in group B goes to the document library at site B, etc.). I think I can do this in site-index.jsp with a redirect, but does anyone know how I can get the groups that a user belongs to in the jsp?
1 REPLY 1

mrksjs
Champ on-the-rise
Champ on-the-rise
if you can retrieve the username you can also get the site-memberships as following:

example for user 'admin'

call the webscript
https://yourinstanceofalfresco:8080/alfresco/service/api/people/admin/sites


which will give you a json object array similar to this

[
{
   "url": "\/alfresco\/service\/api\/sites\/swsdp",
   "sitePreset": "site-dashboard",
   "shortName": "swsdp",
   "title": "Sample: Web Site Design Project",
   "description": "This is a Sample Alfresco Team site.",
   "node": "\/alfresco\/service\/api\/node\/workspace\/SpacesStore\/b4cff62a-664d-4d45-9302-98723eac1319",
   "tagScope": "\/alfresco\/service\/api\/tagscopes\/workspace\/SpacesStore\/b4cff62a-664d-4d45-9302-98723eac1319",
   "siteManagers":
   [
         "mjackson",
         "admin"
   ],
   "isPublic": true,
   "visibility": "PUBLIC"
}
      ,
{
   "url": "\/alfresco\/service\/api\/sites\/test",
   "sitePreset": "site-dashboard",
   "shortName": "test",
   "title": "test",
   "description": "",
   "node": "\/alfresco\/service\/api\/node\/workspace\/SpacesStore\/2bbcc9b1-7b04-4f1e-b03e-a7cca4a02d0f",
   "tagScope": "\/alfresco\/service\/api\/tagscopes\/workspace\/SpacesStore\/2bbcc9b1-7b04-4f1e-b03e-a7cca4a02d0f",
   "siteManagers":
   [
         "admin"
   ],
   "isPublic": true,
   "visibility": "PUBLIC"
}
      
]


array contains 2 objects, means user 'admin' is a member of these two groups (swsdp and test)