From 281ad30eec451449fcebcd732dc613cbf538dcb6 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sun, 21 May 2023 13:15:00 -0400 Subject: [PATCH] docs/admin.rst: added content --- docs/admin.rst | 31 +++++++++++++++++++++++++++++++ docs/user.rst | 28 ++++++++++++++++------------ 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/docs/admin.rst b/docs/admin.rst index 4b38b54..8153c54 100644 --- a/docs/admin.rst +++ b/docs/admin.rst @@ -1,2 +1,33 @@ Admin API ========= + +The administration API ``/admin`` helps the administrator user manage the Sachet server. + +An important component that is not within this endpoint is user management. +See :ref:`user_info_api` and :ref:`user_list_api` for information about managing users. + +Server settings +--------------- + +Sachet has a server settings API:: + + GET /admin/settings + PATCH /admin/settings + PUT /admin/settings + +Currently, server settings are represented by the following object: + +.. code-block:: json + + { + "default_permissions": ["PERMISSION1", "PERMISSION2"] + } + +Anonymous permissions +^^^^^^^^^^^^^^^^^^^^^ + +Anonymous permissions (``default_permissions`` in the schema) are given to clients that do not authenticate. +It is an array of strings as described by :ref:`permissions_table`. + +This can be useful, for example, to publish a file to the Internet. +If the Read shares permission is enabled in anonymous permissions, anyone can read a share if given the link to it. diff --git a/docs/user.rst b/docs/user.rst index 7e058d5..9c26dd7 100644 --- a/docs/user.rst +++ b/docs/user.rst @@ -1,14 +1,6 @@ User API ======== -The User API allows managing users and their permissions. - -Sachet implements the following endpoints for this API:: - - GET /users/ - PATCH /users/ - PUT /users/ - .. _user_schema: User Schema @@ -50,8 +42,18 @@ In JSON, a User object has the following properties: - Read-only - Time the user registered at. -Endpoints ---------- +.. _user_info_api: + +User Info API +------------- + +The User Info API allows managing users and their permissions. + +Sachet implements the following endpoints for this API:: + + GET /users/ + PATCH /users/ + PUT /users/ GET ^^^ @@ -115,8 +117,10 @@ For example: Only :ref:`administrators` can request this method. -User List API -------------- +.. _user_list_api: + +List API +-------- There is also a User List API::