Start a new topic

What json is required to assign a user group either read/write?

The documentation mentions the ability to assign a group read access, but I don't see a json example of what json model is expected to do this.


I just noticed that the HTML5 lib has addReaderGroup/addWriterGroup. So I believe that I can use the REST API to create groups, and then the HTML5 lib to add/remove groups with read/write access.
I think I might've found the json model for assigning read/write access to groups in the REST API authorization docs.

To grant access by user groups, add the group id to the groups.r or groups.w property. By using groups, an app can manage access for a set of users even as users join or leave the group over time. A group with its all property set to true will allow access to all users of the app.

These grants are stored server side by using specific properties nested under _acl in the JSON representation. To ensure correct execution, the exact property names must be passed.

# Regular entity with a detailed ACL structure included


"_id" : "4ff99979c0c014af6ee2773b",

"field1" : "value1",

"field2" : "value2",

"field3" : "value3",



"creator": "user_id_1",

"gr": true,

"gw": false,

"r": ["user_id_2", "user_id_3"],

"w": ["user_id_4", "user_id_5"],

"groups": {

"r": ["group_id_1", "group_id_5"],

"w": ["group_id_3", "group_id_4"]



Login or Signup to post a comment