docs/admin.rst: added content

This commit is contained in:
dogeystamp 2023-05-21 13:15:00 -04:00
parent c0947ebbe2
commit 281ad30eec
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 47 additions and 12 deletions

View File

@ -1,2 +1,33 @@
Admin API 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.

View File

@ -1,14 +1,6 @@
User API User API
======== ========
The User API allows managing users and their permissions.
Sachet implements the following endpoints for this API::
GET /users/<username>
PATCH /users/<username>
PUT /users/<username>
.. _user_schema: .. _user_schema:
User Schema User Schema
@ -50,8 +42,18 @@ In JSON, a User object has the following properties:
- Read-only - Read-only
- Time the user registered at. - 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/<username>
PATCH /users/<username>
PUT /users/<username>
GET GET
^^^ ^^^
@ -115,8 +117,10 @@ For example:
Only :ref:`administrators<permissions_table>` can request this method. Only :ref:`administrators<permissions_table>` can request this method.
User List API .. _user_list_api:
-------------
List API
--------
There is also a User List API:: There is also a User List API::