bepasty: Don't enable app when setup is rerun

Tests:

- Rerun setup after disabling the app. App is not enabled.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2023-07-31 19:46:08 -04:00
1 parent da1e4ed505
commit 099e021024
1 file changed
+3 -1
+3 -1
View File
@@ -100,7 +100,9 @@ class BepastyApp(app_module.App):
"""Install and configure the app."""
super().setup(old_version)
privileged.setup('freedombox.local')
self.enable()
if not old_version:
self.enable()
if old_version == 1 and not privileged.get_configuration().get(
'DEFAULT_PERMISSIONS'):
# Upgrade to a better default only if user hasn't changed the