Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
access_stream: Use mandatory kwargs.
Tim Abbottf68692a893e9
diff --git a/zerver/lib/streams.py b/zerver/lib/streams.pyindex e035d4d2bf3..8c1590fef12 100644--- a/zerver/lib/streams.py+++ b/zerver/lib/streams.py@@ -765,6 +765,7 @@ def access_stream_common(user_profile: UserProfile,stream: Stream,error: str,+ *,require_content_access: bool = True,) -> Subscription | None:"""Common function for backend code where the target use attempts to@@ -802,6 +803,7 @@ def access_stream_common(def access_stream_by_id(user_profile: UserProfile,stream_id: int,+ *,require_content_access: bool = True,) -> tuple[Stream, Subscription | None]:error = _("Invalid channel ID")@@ -822,6 +824,7 @@ def access_stream_by_id(def access_stream_by_id_for_message(user_profile: UserProfile,stream_id: int,+ *,require_content_access: bool = True,) -> tuple[Stream, Subscription | None]:"""@@ -875,7 +878,7 @@ def check_stream_name_available(realm: Realm, name: str) -> None:def access_stream_by_name(- user_profile: UserProfile, stream_name: str, require_content_access: bool = True+ user_profile: UserProfile, stream_name: str, *, require_content_access: bool = True) -> tuple[Stream, Subscription | None]:error = _("Invalid channel name '{channel_name}'").format(channel_name=stream_name)try: