Search code examples
aclparse-server

Modifying ACL in Parse Server


I'm trying to modify the ACL of an object without creating another one. I don't want the current ACL to be deleted or overwritten. Whenever I use object.setACL() it overwrites the current ACL.

Is there a way to save the modified the ACL without overwriting it?


Solution

  • You can get the existing ACL object by calling object.getACL(). From there you can edit/add more roles or users without overwriting the existing ones.

    Once you've modified the existing ACL, you can then object.setACL(modifiedAcl) to save the modifications.