cancel
Showing results for 
Search instead for 
Did you mean: 

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

paglop_
Champ in-the-making
Champ in-the-making

-- 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
(
[username] => g_titi
[permission] => Write
[Granted] =>
)

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
(
[username] => toto
[permission] => ReadWrite
[Granted] => 1
)

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

[0] => stdClass Object
(
[username] => g_titi
[permission] => Write
[Granted] =>
)
[1] => stdClass Object
(
[username] => toto
[permission] => ReadWrite
[Granted] => 1
)

thank you very much

2 REPLIES 2

pibou_Bouvret
Elite Collaborator
Elite Collaborator

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

paglop_
Champ in-the-making
Champ in-the-making

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