Get user details for an Alfresco space

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2009 05:23 AM
Hi,
I need to use a web UI to communicate with Alfresco.
I want to ask if there is a web API that can be used to get some information from a space.
I am looking for something similar to the WCM API "Get Membership" , that uses the /alfresco/service/api/wcm/webprojects/{webprojectref}/memberships/{username} URL to get the details of an user in a specified webProject.
Thanks in advance for your replies.
I need to use a web UI to communicate with Alfresco.
I want to ask if there is a web API that can be used to get some information from a space.
I am looking for something similar to the WCM API "Get Membership" , that uses the /alfresco/service/api/wcm/webprojects/{webprojectref}/memberships/{username} URL to get the details of an user in a specified webProject.
Thanks in advance for your replies.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2009 03:41 AM
I've managed to get the role of all the users in a space by using this script:
The description file :
script:{ var pathSegments = url.match.split("/"); var reference = [ url.templateArgs.store_type, url.templateArgs.store_id ].concat(url.templateArgs.id.split("/")); var theNode = cmis.findNode(pathSegments[2], reference); if (theNode === null) { status.code = 404; status.message = "Repository " + pathSegments[2] + " " + reference.join("/") + " not found"; status.redirect = true; break script; } var permissions = theNode.getPermissions(); var permissionString = ""; permissionString = permissionString + permissions; model.permissions = permissionString;}
The description file :
<webscript> <shortname>Retrieve list of permissions (getPermissionsCustom)</shortname> <description><![CDATA[Gets the list of permissions each user has in the specified space.]]> </description> <url>/api/node/{store_type}/{store_id}/{id}/getPermissionsCustom</url> <url>/api/path/{store_type}/{store_id}/{id}/getPermissionsCustom</url> <authentication>guest</authentication> <transaction allow="readonly"/> <format default="html">argument</format> <family>CMIS</family></webscript>
The ftl file:<html><body><p>Permissions : ${permissions}</p></body></html>
