Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Rename admin_access_required to unsubscribing_others.
Sahil Batra52c8f687ccdf
diff --git a/zerver/lib/streams.py b/zerver/lib/streams.pyindex ef8c54e1ff3..e2739672f53 100644--- a/zerver/lib/streams.py+++ b/zerver/lib/streams.py@@ -625,7 +625,7 @@ def list_to_streams(streams_raw: Collection[StreamDict],user_profile: UserProfile,autocreate: bool = False,- admin_access_required: bool = False,+ unsubscribing_others: bool = False,) -> Tuple[List[Stream], List[Stream]]:"""Converts list of dicts to a list of Streams, validating input in the process@@ -654,7 +654,7 @@ def list_to_streams(missing_stream_dicts: List[StreamDict] = []existing_stream_map = bulk_get_streams(user_profile.realm, stream_set)- if admin_access_required:+ if unsubscribing_others:existing_recipient_ids = [stream.recipient_id for stream in existing_stream_map.values()]subs = Subscription.objects.filter(user_profile=user_profile, recipient_id__in=existing_recipient_ids, active=Truediff --git a/zerver/views/streams.py b/zerver/views/streams.pyindex d301bddf60d..351af47d2d5 100644--- a/zerver/views/streams.py+++ b/zerver/views/streams.py@@ -424,7 +424,7 @@ def remove_subscriptions_backend(streams_as_dict.append({"name": stream_name.strip()})streams, __ = list_to_streams(- streams_as_dict, user_profile, admin_access_required=removing_someone_else+ streams_as_dict, user_profile, unsubscribing_others=removing_someone_else)if principals: