streams: Allow editing subscriptions in archived channels.

Since this does impact the ability to access the channel's content, it
makes sense to permit changing subscriptions, just like other
permissions settings on the archived channel.
This commit is contained in:
Tim Abbott
2025-03-07 16:54:32 -08:00
parent 5b2bd07612
commit c58f14b159
3 changed files with 35 additions and 10 deletions

View File

@@ -313,7 +313,7 @@ def bulk_get_streams(realm: Realm, stream_names: set[str]) -> dict[str, Any]:
"upper(zerver_stream.name::text) IN (SELECT upper(name) FROM unnest(%s) AS name)"
)
return (
get_active_streams(realm)
get_all_streams(realm, include_archived_channels=True)
.select_related("can_send_message_group", "can_send_message_group__named_user_group")
.extra(where=[where_clause], params=(list(stream_names),)) # noqa: S610
)