4 Replies Latest reply on Nov 17, 2014 9:49 AM by Oleg Kulikov

    Change ACL via CMIS

    Jan Petzold Newbie

      I set ACLs for nodes via JCR API and it worked directly. Now I'm trying to do the same via CMIS/Chemistry and it does not seem to work at all:

       

      doc foo = Document ...
      
      OperationContext operationContext = new OperationContextImpl();
      operationContext.setIncludeAcls(true);
      
      List<String> permissions = new ArrayList<String>();
      
      permissions.add("cmis:write");
      
      String principal = "me";
      Ace aceIn = session.getObjectFactory().createAce(principal, permissions);
      List<Ace> aceListIn = new ArrayList<Ace>();
      
      aceListIn.add(aceIn);
      
      doc.addAcl(aceListIn, AclPropagation.REPOSITORYDETERMINED);
      

       

      Calling this triggers

       

      org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException: Operation not supported by the repository for this object!

       

      I tried that for both files and folders. I can also see that in the reported repository capabilities:

       

      ((RepositoryImpl) repository).getCapabilities().getAclCapability() = NONE
      

       

      Anything I can do about it?