12-07-2016 10:10 AM
Hi ,
In my site all user require Collaborative role actually its consumer , so i added a configuration like this
<permissionSet type="st:site" expose="selected">
<permissionGroup name="SiteManager" allowFullControl="true" expose="true" />
<permissionGroup name="SiteCollaborator" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<permissionGroup name="SiteContributor" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Contributor" type="cm:cmobject" />
</permissionGroup>
<permissionGroup name="SiteConsumer" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
</permissionGroup>
<permissionGroup name="SiteCommentator" allowFullControl="false" expose="true">
<includePermissionGroup permissionGroup="Consumer" type="cm:cmobject" />
<includePermissionGroup permissionGroup="ReadPermissions" type="sys:base" />
</permissionGroup>
</permissionSet>
in alfresco-community\tomcat\shared\classes\alfresco\extension\sitePermissionDefinitions.xml
but its still access denied for some operations.
or if there is any other way, please let me know with sample codes
Thank you
12-09-2016 02:10 AM
I creating user in this method
String urlString = "http://127.0.0.1:8090/alfresco/service/api/people?alf_ticket="
+ authTicket;
System.out.println("The addUser url:::" + urlString);
HttpClient client = new HttpClient();
PostMethod mPost = new PostMethod(urlString);
UserDetails objUserDetails = new UserDetails();
objUserDetails.setUserName(userdetailobj.getUserName());
objUserDetails.setPassword(userdetailobj.getPassword());
objUserDetails.setFirstName(userdetailobj.getFirstName());
objUserDetails.setLastName(userdetailobj.getLastName());
objUserDetails.setEmail(userdetailobj.getEmail());
//groups[0]="CBGroup";
objUserDetails.setGroups(group);
objUserDetails.setQuota(quota);
StringRequestEntity requestEntity = new StringRequestEntity(
getJSONString(objUserDetails), "application/json", "UTF-8");
mPost.setRequestEntity(requestEntity);
int statusCode1 = client.executeMethod(mPost);
here, trying to add this user into CBGroup and how to add CBGroup to CBSite
12-09-2016 02:34 AM
About webscript api ,please visit http://localhost:8080/alfresco/s/index/package/org/alfresco/repository/site/membership and login with admin accout. how to add member to site
12-09-2016 04:21 AM
thank you keyne,
String apiurl1 = "http://127.0.0.1:8090/alfresco/s/sites/"+siteName+"/memberships";
PostMethod post1 = new PostMethod(apiurl1);
JSONObject body1 = new JSONObject();
body1.put("shortName", groupName);
body1.put("displayName", groupName);
body1.put("displayName", groupName);
body1.put("site","site_"+siteName);
post1.setDoAuthentication(true);
post1.setRequestHeader("Content-Type", "application/json");
post1.setRequestEntity(new StringRequestEntity(body1.toString(),"application/json", "UTF-8"));
int status1 = client.executeMethod(post1);
getting error
has responded with a status of 404 - Not Found
Script url /sites/TESTDAM/memberships does not map to a Web Script
12-09-2016 02:17 AM
Hi Kayne, I Succes fully added user to group ...
Now I need to know How Groups are adding to site
Thank you
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.