Invite user to space by webscript
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2010 03:40 AM
Hi,
Is there any webscript available which invites a user/group to a space ?
The webscript "Invite" is for inviting users to a site. As it is asking for parameters like siteShortName and inviteeSiteRole.
I am using Alfresco3.2r2.
Thanks in advance,
Sanket.
Is there any webscript available which invites a user/group to a space ?
The webscript "Invite" is for inviting users to a site. As it is asking for parameters like siteShortName and inviteeSiteRole.
I am using Alfresco3.2r2.
Thanks in advance,
Sanket.
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2010 09:56 AM
Well, I didn't find any direct webscript available for inviting users to a space.
I created my own and gave permission to the required user/group as follows.
String lStrSpaceUserName = request.getParameter("spaceUserName");
String lStrSpaceNodeRef = request.getParameter("spaceNodeRef");
String userName = getAuthorityService().getName(AuthorityType.USER, lStrSpaceUserName);
if(personService.personExists(userName)){
nodeRefOfPermissiveSpace = new NodeRef(Repository.getStoreRef(),lStrSpaceNodeRef);
Set set = getPermissionService().getPermissions(nodeRefOfPermissiveSpace);
Iterator iter = set.iterator();
while(iter.hasNext()){
System.out.println("******PErmissions*****:"+iter.next());
}
getPermissionService().setInheritParentPermissions(nodeRefOfPermissiveSpace, true);
getPermissionService().setPermission(nodeRefOfPermissiveSpace,userName ,PermissionService.COORDINATOR, true);
}
/*in this way, I gave the Coordinator role to the userName*/
Hope, it helps some of you guise.
Thanks,
Sanket.
I created my own and gave permission to the required user/group as follows.
String lStrSpaceUserName = request.getParameter("spaceUserName");
String lStrSpaceNodeRef = request.getParameter("spaceNodeRef");
String userName = getAuthorityService().getName(AuthorityType.USER, lStrSpaceUserName);
if(personService.personExists(userName)){
nodeRefOfPermissiveSpace = new NodeRef(Repository.getStoreRef(),lStrSpaceNodeRef);
Set set = getPermissionService().getPermissions(nodeRefOfPermissiveSpace);
Iterator iter = set.iterator();
while(iter.hasNext()){
System.out.println("******PErmissions*****:"+iter.next());
}
getPermissionService().setInheritParentPermissions(nodeRefOfPermissiveSpace, true);
getPermissionService().setPermission(nodeRefOfPermissiveSpace,userName ,PermissionService.COORDINATOR, true);
}
/*in this way, I gave the Coordinator role to the userName*/
Hope, it helps some of you guise.
Thanks,
Sanket.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2013 10:09 AM
how do i invite a user group to space using webservices ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2013 11:27 PM
I'm afraid invitation service dose not expose webservice api,you can use webscript api.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2013 03:27 AM
modified the code wrote and exposed the service
