AnsweredAssumed Answered

How to apply acl in createDocument service

Question asked by rexmao on Mar 29, 2010
Latest reply on May 19, 2011 by cpotter

I want to apply a acl to the new object justed created. I'm currently using the createDocument() in ObjectService. After my code ran, there's no changes on the document. Here's my code. I also found the canApplyAcl of this object was false. Does this impact my code running? Anybody know where to change the value?


            ObjectService.cmisAccessControlListType acl = new wsstudy.ObjectService.cmisAccessControlListType();

            ObjectService.cmisAccessControlEntryType ace = new wsstudy.ObjectService.cmisAccessControlEntryType();

            ace.permission = new string[] { "Editor"};
            ObjectService.cmisAccessControlPrincipalType principal = new ObjectService.cmisAccessControlPrincipalType();

            principal.principalId = "d373b243-cc6c-445b-ad70-82732e9ca0de";
            acl.permission = new wsstudy.ObjectService.cmisAccessControlEntryType[] { ace };

            pendingUpload.mimeType = "unknown/unknown";
            ObjectService.cmisExtensionType ext = new ObjectService.cmisExtensionType();
            string dcoRtn = objectS.createDocument(repositoryId, newDocProperties, rootFolderId, pendingUpload,  ObjectService.enumVersioningState.major,null,acl, null, ref ext);