Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
groups: Enable group-valued settings in production.
Tim Abbottf54817d78d12
diff --git a/zerver/models/realms.py b/zerver/models/realms.pyindex 9b5a0fc4d8b..8a6ac401ed6 100644--- a/zerver/models/realms.py+++ b/zerver/models/realms.py@@ -672,7 +672,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubREALM_PERMISSION_GROUP_SETTINGS: dict[str, GroupPermissionSetting] = dict(create_multiuse_invite_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=True,@@ -691,7 +691,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stuballowed_system_groups=[SystemGroups.EVERYONE, SystemGroups.MEMBERS],),can_add_custom_emoji_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=False,@@ -700,7 +700,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_add_custom_emoji_group_id",),can_create_groups=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=True,allow_nobody_group=False,@@ -709,7 +709,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_create_groups_id",),can_create_public_channel_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=False,@@ -718,7 +718,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_create_public_channel_group_id",),can_create_private_channel_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=False,@@ -742,7 +742,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub],),can_delete_any_message_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=False,@@ -751,7 +751,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_delete_any_message_group_id",),can_delete_own_message_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=False,@@ -760,7 +760,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_delete_own_message_group_id",),can_manage_all_groups=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=True,allow_nobody_group=False,@@ -769,7 +769,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_manage_all_groups_id",),can_move_messages_between_channels_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=True,@@ -778,7 +778,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_move_messages_between_channels_group_id",),can_move_messages_between_topics_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=False,allow_nobody_group=True,@@ -787,7 +787,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="can_move_messages_between_topics_group_id",),direct_message_initiator_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=True,allow_nobody_group=True,@@ -796,7 +796,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stubid_field_name="direct_message_initiator_group_id",),direct_message_permission_group=GroupPermissionSetting(- require_system_group=not settings.ALLOW_GROUP_VALUED_SETTINGS,+ require_system_group=False,allow_internet_group=False,allow_owners_group=True,allow_nobody_group=True,diff --git a/zproject/default_settings.py b/zproject/default_settings.pyindex b4c7f6b6912..6b62e885412 100644--- a/zproject/default_settings.py+++ b/zproject/default_settings.py@@ -667,12 +667,6 @@ SIGNED_ACCESS_TOKEN_VALIDITY_IN_SECONDS = 60CUSTOM_AUTHENTICATION_WRAPPER_FUNCTION: Callable[..., Any] | None = None-# Whether we allow settings to be set to a collection of users and-# groups as described in api_docs/group-setting-values.md. Set to-# False in production, as we can only handle named user groups in the-# web app settings UI.-ALLOW_GROUP_VALUED_SETTINGS = False-# Grace period during which we don't send a resolve/unresolve# notification to a stream and also delete the previous counter# notification.diff --git a/zproject/dev_settings.py b/zproject/dev_settings.pyindex c7def46bdb0..20f7807a38f 100644--- a/zproject/dev_settings.py+++ b/zproject/dev_settings.py@@ -211,9 +211,6 @@ ZULIP_SERVICES_URL = f"http://push.{EXTERNAL_HOST}"ZULIP_SERVICE_PUSH_NOTIFICATIONS = TrueZULIP_SERVICE_SUBMIT_USAGE_STATISTICS = True-# Breaks the UI if used, but enabled for development environment testing.-ALLOW_GROUP_VALUED_SETTINGS = True-# This value needs to be lower in development than usual to allow# for quicker testing of the feature.RESOLVE_TOPIC_UNDO_GRACE_PERIOD_SECONDS = 5diff --git a/zproject/test_extra_settings.py b/zproject/test_extra_settings.pyindex a2c600b09de..f0951ef364f 100644--- a/zproject/test_extra_settings.py+++ b/zproject/test_extra_settings.py@@ -281,8 +281,6 @@ SCIM_CONFIG: dict[str, SCIMConfigDict] = {}}-ALLOW_GROUP_VALUED_SETTINGS = True-# This override disables the grace period for undoing resolving/unresolving# a topic in tests.# This allows tests to not worry about the special behavior during the grace period.