Documentation and changelog for web `readonly` option fixing #3870.

Signed-off-by: Graham R. Cobb <g+beets@cobb.uk.net>
This commit is contained in:
Graham R. Cobb 2021-03-11 23:09:51 +00:00
parent 23c8d61104
commit 680ccdcd96
2 changed files with 10 additions and 0 deletions

View file

@ -335,6 +335,9 @@ Fixes:
* :doc:`/plugins/chroma`: Fixed submitting AcoustID information for tracks * :doc:`/plugins/chroma`: Fixed submitting AcoustID information for tracks
that already have a fingerprint. that already have a fingerprint.
:bug:`3834` :bug:`3834`
* :doc:`/plugins/web`: DELETE and PATCH methods are disallowed by default.
Set ``readonly: no`` web config option to enable them.
:bug:`3870`
For plugin developers: For plugin developers:

View file

@ -66,6 +66,8 @@ configuration file. The available options are:
Default: false. Default: false.
- **include_paths**: If true, includes paths in item objects. - **include_paths**: If true, includes paths in item objects.
Default: false. Default: false.
- **readonly**: If true, DELETE and PATCH operations are not allowed. Only GET is permitted.
Default: true.
Implementation Implementation
-------------- --------------
@ -189,6 +191,8 @@ code.
Removes the item with id *6* from the beets library. If the *?delete* query string is included, Removes the item with id *6* from the beets library. If the *?delete* query string is included,
the matching file will be deleted from disk. the matching file will be deleted from disk.
Only allowed if ``readonly`` configuration option is set to ``no``.
``PATCH /item/6`` ``PATCH /item/6``
++++++++++++++++++ ++++++++++++++++++
@ -203,6 +207,8 @@ Returns the updated JSON representation. ::
... ...
} }
Only allowed if ``readonly`` configuration option is set to ``no``.
``GET /item/6,12,13`` ``GET /item/6,12,13``
+++++++++++++++++++++ +++++++++++++++++++++
@ -279,6 +285,7 @@ or ``/album/5,7``. In addition we can request the cover art of an album with
``GET /album/5/art``. ``GET /album/5/art``.
You can also add the '?expand' flag to get the individual items of an album. You can also add the '?expand' flag to get the individual items of an album.
``DELETE`` is only allowed if ``readonly`` configuration option is set to ``no``.
``GET /stats`` ``GET /stats``
++++++++++++++ ++++++++++++++