streams: Add get_content_access_streams function.

To get content access streams for mention.py, we will now use
get_content_access_streams and we have done a lot more other refactors
in this commit around filter_stream_authorization. Mainly making that
function only to be used for adding subscribers and naming it
accordingly.
This commit is contained in:
Shubham Padia
2025-02-21 18:17:01 +00:00
committed by Tim Abbott
parent 3132bdb20f
commit 63a4aea7a8
6 changed files with 158 additions and 68 deletions

View File

@@ -70,7 +70,7 @@ from zerver.lib.streams import (
access_web_public_stream,
check_stream_name_available,
do_get_streams,
filter_stream_authorization,
filter_stream_authorization_for_adding_subscribers,
get_group_setting_value_dict_for_streams,
get_stream_permission_default_group,
get_stream_permission_policy_name,
@@ -699,7 +699,7 @@ def add_subscriptions_backend(
setting_groups_dict=setting_groups_dict,
)
streams_categorized_by_permissions = filter_stream_authorization(
streams_categorized_by_permissions = filter_stream_authorization_for_adding_subscribers(
user_profile, existing_streams, is_subscribing_other_users
)
authorized_streams = streams_categorized_by_permissions.authorized_streams