Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

streams: Handle "#streams/new" url for users who cannot create streams.

Sahil Batra7da8f9650c26
diff --git a/web/src/stream_settings_ui.js b/web/src/stream_settings_ui.js
index 52a70600f86..990daf264ba 100644
--- a/web/src/stream_settings_ui.js
+++ b/web/src/stream_settings_ui.js
@@ -702,7 +702,11 @@ function show_right_section() {
export function change_state(section, right_side_tab) {
// if in #streams/new form.
if (section === "new") {
- if (!current_user.is_guest) {
+ const can_create_streams =
+ settings_data.user_can_create_private_streams() ||
+ settings_data.user_can_create_public_streams() ||
+ settings_data.user_can_create_web_public_streams();
+ if (can_create_streams) {
do_open_create_stream();
show_right_section();
} else {