mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
Currently, for computing fields like can_create_public_streams and can_create_private_steams fields, is_user_in_group is called to check whether the user is part of the group which has the permission. This means that there will be one DB query for each field. To optimize this, we now first fetch all the groups that the user is member of, including the anonymous groups which are used for settings, such that we can then just check whether the user is part of the group which has the permission meaning we would need only one query to compute all the fields. This would be helpful when settings for other similar fields will also be migrated to groups framework.
82 KiB
82 KiB