Files
zulip/web/tests/stream_data.test.cjs
Prakhar Pratyush 1acf309d57 stream_data: Fix 'can_access_stream_email' function.
'can_access_stream_email' function determines who can
generate email to send message in a channel.

Earlier, the function was not considering channel post policy.
So, a user which doesn't have permission to post in
a channel as per channel post policy could generate channel email.

This commit makes sure to not show the "Generate email address"
button in such cases.

We show the button only if the current user or any of the bots
they control has the permission to post in the channel.

Fixes part of #31566.
2025-02-12 15:08:32 -08:00

58 KiB