From 71042f086065aec63de911c82f1177d9306c3dbf Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 6 Feb 2023 14:31:57 +0100 Subject: [PATCH] appsv2: when initalizing permission, make sure to add 'all_users' when visitors is chosen --- src/utils/resources.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/resources.py b/src/utils/resources.py index e76a6cc92..771a0e1e1 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -348,6 +348,11 @@ class PermissionsResource(AppResource): or self.get_setting(f"init_{perm}_permission") or [] ) + + # If we're choosing 'visitors' from the init_{perm}_permission question, add all_users too + if not infos["allowed"] and init_allowed == "visitors": + init_allowed = ["visitors", "all_users"] + permission_create( perm_id, allowed=init_allowed,