mirror of https://github.com/zulip/zulip.git
groups: Enable group-valued settings in production.
This commit is contained in:
parent
315f9786dd
commit
f54817d78d
|
@ -672,7 +672,7 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
|
|||
|
||||
REALM_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-stub
|
|||
allowed_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-stub
|
|||
id_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-stub
|
|||
id_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-stub
|
|||
id_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-stub
|
|||
id_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-stub
|
|||
id_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-stub
|
|||
id_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-stub
|
|||
id_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-stub
|
|||
id_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-stub
|
|||
id_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,
|
||||
|
|
|
@ -667,12 +667,6 @@ SIGNED_ACCESS_TOKEN_VALIDITY_IN_SECONDS = 60
|
|||
|
||||
CUSTOM_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.
|
||||
|
|
|
@ -211,9 +211,6 @@ ZULIP_SERVICES_URL = f"http://push.{EXTERNAL_HOST}"
|
|||
ZULIP_SERVICE_PUSH_NOTIFICATIONS = True
|
||||
ZULIP_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 = 5
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue