From 95a05e1dfd6b1a8b7894a03449c70f7fb9d15056 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 13 Oct 2023 08:14:21 -0700 Subject: [PATCH] Fix location of owner in API documentation --- docs/api.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/api.md b/docs/api.md index df86ef1e5..c7377760d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -272,19 +272,20 @@ consumption including the ID of a created document if consumption succeeded. ## Permissions All objects (documents, tags, etc.) allow setting object-level permissions -with an optional `set_permissions` parameter which is of the form: +with optional `owner` and / or a `set_permissions` parameters which are of +the form: ``` -{ - "owner": user_id, - "view": { - "users": [...], - "groups": [...], - }, - "change": { - "users": [...], - "groups": [...], - }, +"owner": ..., +"set_permissions": { + "view": { + "users": [...], + "groups": [...], + }, + "change": { + "users": [...], + "groups": [...], + }, } ``` @@ -292,7 +293,7 @@ with an optional `set_permissions` parameter which is of the form: Arrays should contain user or group ID numbers. -If this parameter is supplied the object's permissions will be overwritten, +If these parameters are supplied the object's permissions will be overwritten, assuming the authenticated user has permission to do so (the user must be the object owner or a superuser).