You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Samuel Jackvony <sj...@bryant.edu> on 2017/08/01 11:57:44 UTC
CMIS doc permission /acl
Hi,
I am getting a not found error when trying to set a CMIS doc into a doc object.... I know the doc exists and the program verifies it. I assume the issue is with the permissions (checkout permissions) but I cannot seem to update the ACL on it. When I try i get an internal server error.
List<Ace> addAcl = new ArrayList<Ace>(); //Changes user permissions for the folder in order to allow user to getDoc
List<String> permissionsUser = newArrayList<String>();
permissionsUser.add("cmis:all");
Ace aceUser1 = session.getObjectFactory().createAce(currentUser,
permissionsUser);
addAcl.add(aceUser1);
System.out.println(permissionsUser);
List<Ace> removeAcl = newArrayList<Ace>();
List<String> permissionsEveryone = new ArrayList<String>();
permissionsEveryone.add("cmis:all");
Ace aceEveryone = session.getObjectFactory().createAce(
"{sap:builtin}everyone", permissionsEveryone);
removeAcl.add(aceEveryone);
session.getObjectByPath(folderPath).applyAcl(addAcl, removeAcl, AclPropagation.OBJECTONLY);
IS this a result of missing a certain level of access?
Thanks,
Sam
Re: CMIS doc permission /acl
Posted by "Huebel, Jens" <j....@sap.com>.
Hi Sam,
Your code is not complete and hardly readable, but you are talking about a document and:
session.getObjectByPath(folderPath).applyAcl(addAcl, removeAcl, AclPropagation.OBJECTONLY);
indicates that folderPath is a folder. With AclPropagation.OBJECTONLY only this folder gets a new ACL but not the children.
Can this be your issue?
On 01.08.17, 14:01, "Samuel Jackvony" <sj...@bryant.edu> wrote:
Hi,
I am getting a not found error when trying to set a CMIS doc into a doc object.... I know the doc exists and the program verifies it. I assume the issue is with the permissions (checkout permissions) but I cannot seem to update the ACL on it. When I try i get an internal server error.
List<Ace> addAcl = new ArrayList<Ace>(); //Changes user permissions for the folder in order to allow user to getDoc
List<String> permissionsUser = newArrayList<String>();
permissionsUser.add("cmis:all");
Ace aceUser1 = session.getObjectFactory().createAce(currentUser,
permissionsUser);
addAcl.add(aceUser1);
System.out.println(permissionsUser);
List<Ace> removeAcl = newArrayList<Ace>();
List<String> permissionsEveryone = new ArrayList<String>();
permissionsEveryone.add("cmis:all");
Ace aceEveryone = session.getObjectFactory().createAce(
"{sap:builtin}everyone", permissionsEveryone);
removeAcl.add(aceEveryone);
session.getObjectByPath(folderPath).applyAcl(addAcl, removeAcl, AclPropagation.OBJECTONLY);
IS this a result of missing a certain level of access?
Thanks,
Sam