cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply acl in createDocument service

rexmao
Champ in-the-making
Champ in-the-making
Hi,

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?

Thanks,
Rex

            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);
8 REPLIES 8

nikes
Champ on-the-rise
Champ on-the-rise
I am not an expert in CMIS part since I am also evaluating it.

As per my knowledge Alfreco CMIS doesn't support ACLService.

Using CMIS we can check whether a CMIScompliant repository (eg. Alfresco, Filenet, Documentum) provides
particular capability or no.

Hope this helps.

cpotter
Champ on-the-rise
Champ on-the-rise
I am not an expert in CMIS part since I am also evaluating it.

As per my knowledge Alfreco CMIS doesn't support ACLService.

Using CMIS we can check whether a CMIScompliant repository (eg. Alfresco, Filenet, Documentum) provides
particular capability or no.

Hope this helps.

Any news about ACL CMIS implementation in Alfresco 3.4+ ?

fmui
Champ in-the-making
Champ in-the-making
ACLs are supported and always have been.

cpotter
Champ on-the-rise
Champ on-the-rise
ACLs are supported and always have been.

Ok found the docs.

However did not find curl examples to set the ACL. It is perhaps obvious for Alfresco specialists , but for occasional users it is not.

fmui
Champ in-the-making
Champ in-the-making
I assume you want to use the AtomPub binding.
There are examples here and here how the get the ACL.
Setting the ACL works the other way round. The ACL has to be POSTed to the object entry URL.

cpotter
Champ on-the-rise
Champ on-the-rise
I assume you want to use the AtomPub binding.
There are examples here and here how the get the ACL.
Setting the ACL works the other way round. The ACL has to be POSTed to the object entry URL.

Setting the ACL worked fine. Thanks for the url

Now we want to do :

- Remove a specific ACL (we only managed to add new ACLs but no modification / deletion worked)
- Remove heritage in a particular Folder (remove Inherit Parent Space Permissions)

or :

- Creating a folder with specific ACL directly (CMIS)

If you have specific tutorial, thanks in advance
Christopher

fmui
Champ in-the-making
Champ in-the-making
The AtomPub binding expects a complete list of direct ACEs. If there have been other direct ACEs, they will be removed or changed.
Indirect ACEs (= inherited ACEs) have to be changed at the folder that defines them. At the moment it is not possible to break the ACE inheritance in Alfresco via CMIS.

cpotter
Champ on-the-rise
Champ on-the-rise
At the moment it is not possible to break the ACE inheritance in Alfresco via CMIS.
Thank you for your useful anwser. However we did not find any way to remove inheritance with REST either

Regards,
Chris