From ce709ca8ce736155bebd47c2b1e6b07e28a93cdb Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 15 Aug 2022 13:33:15 -0700 Subject: [PATCH] doc: dev: Document previously undocumented components Tests: - Build HTML and ensure build succeeds that the changes are reflected. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- doc/dev/reference/components/daemon.rst | 3 +++ doc/dev/reference/components/enablestate.rst | 7 +++++++ doc/dev/reference/components/index.rst | 2 ++ doc/dev/reference/components/users.rst | 7 +++++++ plinth/app.py | 11 ++++++++++- 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 doc/dev/reference/components/enablestate.rst create mode 100644 doc/dev/reference/components/users.rst diff --git a/doc/dev/reference/components/daemon.rst b/doc/dev/reference/components/daemon.rst index 293d715a5..ff6dd4664 100644 --- a/doc/dev/reference/components/daemon.rst +++ b/doc/dev/reference/components/daemon.rst @@ -5,3 +5,6 @@ Daemon .. autoclass:: plinth.daemon.Daemon :members: + +.. autoclass:: plinth.daemon.RelatedDaemon + :members: diff --git a/doc/dev/reference/components/enablestate.rst b/doc/dev/reference/components/enablestate.rst new file mode 100644 index 000000000..056432a57 --- /dev/null +++ b/doc/dev/reference/components/enablestate.rst @@ -0,0 +1,7 @@ +.. SPDX-License-Identifier: CC-BY-SA-4.0 + +EnableState +^^^^^^^^^^^ + +.. autoclass:: plinth.app.EnableState + :members: diff --git a/doc/dev/reference/components/index.rst b/doc/dev/reference/components/index.rst index 7273e82ca..a105c69bb 100644 --- a/doc/dev/reference/components/index.rst +++ b/doc/dev/reference/components/index.rst @@ -7,6 +7,7 @@ Components :caption: Available components: info + enablestate menu packages daemon @@ -15,6 +16,7 @@ Components frontpage domain letsencrypt + users staticfiles backups coturn diff --git a/doc/dev/reference/components/users.rst b/doc/dev/reference/components/users.rst new file mode 100644 index 000000000..88e09d17f --- /dev/null +++ b/doc/dev/reference/components/users.rst @@ -0,0 +1,7 @@ +.. SPDX-License-Identifier: CC-BY-SA-4.0 + +Users +^^^^^ + +.. autoclass:: plinth.modules.users.components.UsersAndGroups + :members: diff --git a/plinth/app.py b/plinth/app.py index a3d1d7781..408a7b90e 100644 --- a/plinth/app.py +++ b/plinth/app.py @@ -455,7 +455,16 @@ class Info(FollowerComponent): class EnableState(LeaderComponent): - """A component to hold the enable state of an app using a simple flag.""" + """A component to hold the enable state of an app using a simple flag. + + The flag is stored in the FreedomBox service database. This component + should only be used if an app does not have any other way to determine if + it is enabled or disabled by examining the state of the system. Typical + apps have daemons, web server configuration, etc. and the enabled/disabled + state of those determine the enabled/disabled state of the entire app. If + an does not have any such system state, then this component may be used to + provide enable/disable functionality for the app. + """ @property def key(self):