mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +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 = {
|
||||
stream_id: 999,
|
||||
is_private: true,
|
||||
is_admin: true,
|
||||
};
|
||||
var html = render('subscription_stream_privacy_modal', args);
|
||||
|
||||
|
||||
@@ -580,6 +580,7 @@ exports.setup_page = function (callback) {
|
||||
hide_all_streams: !should_list_all_streams(),
|
||||
max_name_length: page_params.stream_name_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);
|
||||
|
||||
@@ -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' }}
|
||||
</label>
|
||||
</li>
|
||||
{{#if is_admin}}
|
||||
<li>
|
||||
<label class="checkbox">
|
||||
<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' }}
|
||||
</label>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user