How to use "Document.setACE" with cURL to add multiple ACL ? (without deleting those that are available)

– Nuxeo 5.8 –

Hi,

I want to change the rights on the “MyFolder” folder:
user : toto
Group : g_titi
but I can not change both

My commands:

curl -X POST http: // website-dev:8080 / nuxeo / site / automation / Document.SetACE '-u admin:xxxxxxx -H' Content-Type: application / json + nxrequest ' -d {“input”: “doc: / Driver / workspaces / MyFolder”, “params”: {“permission”, “Write”, “user”: “g_titi”, “acl”, “local”, “grant” “false”, “overwrite”: “true”}} '

It's OK:
[0] => stdClass Object

(<br>
   [username] => g_titi<br>
   [permission] => Write<br>
   [Granted] =><br>
)<br>

curl -X POST http: // website-dev:8080 / nuxeo / site / automation / Document.SetACE '-u admin:xxxxxxx -H' Content-Type: application / json + nxrequest '-d {“input”: “doc: / Driver / workspaces / MyFolder”, “params”: {“permission”: “ReadWrite”, “user”: “toto”, “acl”, “local”, “grant” “true”, “overwrite”: “true”}} '

It's OK:
[0] => stdClass Object

(<br>
   [username] => toto<br>
   [permission] => ReadWrite<br>
   [Granted] => 1<br>
)<br>

But this last command has deleted the previous one !!!
How to Obtain:

[0] => stdClass Object

(<br>
   [username] => g_titi<br>
   [permission] => Write<br>
   [Granted] =><br>
)<br>

[1] => stdClass Object

(<br>
   [username] => toto<br>
   [permission] => ReadWrite<br>
   [Granted] => 1<br>
)<br>

thank you very much

0 votes

2 answers

1270 views

ANSWER



Of course ! It's ok, thank you very much.

0 votes



The “overwrite : true” clause might be the cause of your problems

0 votes