mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
settings_data: Optimize user_can_access_all_other_users.
This fixes an important issue where this function being called in a loop can consume as much as 1ms per iteration for users who are in a lot of groups.
This commit is contained in:
@@ -730,6 +730,8 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
|
||||
allow_nobody_group=False,
|
||||
allow_everyone_group=True,
|
||||
default_group_name=SystemGroups.EVERYONE,
|
||||
# Note that user_can_access_all_other_users in the web
|
||||
# app is relying on members always have access.
|
||||
allowed_system_groups=[SystemGroups.EVERYONE, SystemGroups.MEMBERS],
|
||||
),
|
||||
can_add_subscribers_group=GroupPermissionSetting(
|
||||
|
||||
Reference in New Issue
Block a user