From 116d164846fd07f12b4a1df4037591b4a9fa9dd0 Mon Sep 17 00:00:00 2001 From: OllisGit <24205767+OllisGit@users.noreply.github.com> Date: Mon, 7 Feb 2022 17:30:52 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Change=20description=20and=20exa?= =?UTF-8?q?mple=20code=20to=20const-values=20(#4400)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/plugins/hooks.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index 1f65e91af..f19a0fefe 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -228,7 +228,7 @@ octoprint.access.permissions suffice. * ``dangerous``: Whether this permission should be considered dangerous (``True``) or not (``False``) * ``default_groups``: A list of standard groups this permission should be apply to by default. Standard groups - are ``admins``, ``users``, ``readonly`` and ``guests`` + are ``octoprint.access.ADMIN_GROUP``, ``octoprint.access.USER_GROUP``, ``octoprint.access.READONLY_GROUP`` and ``octoprint.access.GUEST_GROUP`` The following example is based on some actual code included in the bundled Application Keys plugin and defines one additional permission called ``ADMIN`` with a role ``admin`` which is marked as dangerous (since it gives @@ -237,6 +237,8 @@ octoprint.access.permissions .. code-block:: python + from octoprint.access import ADMIN_GROUP + def get_additional_permissions(*args, **kwargs): return [ dict(key="ADMIN",