mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 05:53:43 +00:00
stream settings: Hide creating admin-only streams in members UI.
This commit takes away the ability for non-admin members to create streams where only admins can post messages by hiding the option from them. Fixes #11290.
This commit is contained in:
@@ -1230,6 +1230,7 @@ run_test('subscription_stream_privacy_modal', () => {
|
|||||||
var args = {
|
var args = {
|
||||||
stream_id: 999,
|
stream_id: 999,
|
||||||
is_private: true,
|
is_private: true,
|
||||||
|
is_admin: true,
|
||||||
};
|
};
|
||||||
var html = render('subscription_stream_privacy_modal', args);
|
var html = render('subscription_stream_privacy_modal', args);
|
||||||
|
|
||||||
|
|||||||
@@ -580,6 +580,7 @@ exports.setup_page = function (callback) {
|
|||||||
hide_all_streams: !should_list_all_streams(),
|
hide_all_streams: !should_list_all_streams(),
|
||||||
max_name_length: page_params.stream_name_max_length,
|
max_name_length: page_params.stream_name_max_length,
|
||||||
max_description_length: page_params.stream_description_max_length,
|
max_description_length: page_params.stream_description_max_length,
|
||||||
|
is_admin: page_params.is_admin,
|
||||||
};
|
};
|
||||||
|
|
||||||
var rendered = templates.render('subscription_table_body', template_data);
|
var rendered = templates.render('subscription_table_body', template_data);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
{{t '<b>Private, protected history:</b> must be invited by a member; new members can only see messages sent after they join; hidden from non-administrator users' }}
|
{{t '<b>Private, protected history:</b> must be invited by a member; new members can only see messages sent after they join; hidden from non-administrator users' }}
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
{{#if is_admin}}
|
||||||
<li>
|
<li>
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox" name="is-announcement-only" value="is-announcement-only" {{#if is_announcement_only}}checked{{/if}}/>
|
<input type="checkbox" name="is-announcement-only" value="is-announcement-only" {{#if is_announcement_only}}checked{{/if}}/>
|
||||||
@@ -24,4 +25,5 @@
|
|||||||
{{t 'Restrict posting to organization administrators' }}
|
{{t 'Restrict posting to organization administrators' }}
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user