cancel
Showing results for 
Search instead for 
Did you mean: 

can't remove inherited permissions

bprager
Champ in-the-making
Champ in-the-making
This topic seems to come up quite frequently and I am having troubles with this as well.

The parent folder is accessible for EVERYONE. When I upload documents (via CMIS API) I check the inherited permissions and want to remove them, so I can make this particular document readable to only selected users. This doesn't seem to work.

Here is my code snippet:

         doc = repoFolder.createDocument(properties, contentStream, VersioningState.NONE);

         OperationContext operationContext = new OperationContextImpl();
         operationContext.setIncludeAcls(true);
         CmisObject object = session.getObject(doc.getId(), operationContext);
         Acl originalAcl = object.getAcl();
         
         List<Ace> remAces = originalAcl.getAces();
         object.removeAcl(remAces, AclPropagation.OBJECTONLY);


After this line the document is still readable by EVERYONE. Is there a way around this in Java?

Thank you for any help.
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
You cannot remove inherited ACEs from the ACL of an object and you cannot break ACL inheritance for an object using CMIS.

Jeff

kaynezhang
World-Class Innovator
World-Class Innovator
You can  turn  off inherited ACEs from parent for that node by using webscript api