subs: Disable the retention dropdown in stream creation form also.

We should disable the stream message retention dropdown for owners
of realm with limited plans. The behavior is correct in other
places, will also just explain the behavior in other places -

For limited plans-
1. Owners can see the dropdown in stream creation form but others
cannot, and in stream privacy modal, the modal is visible to all.
But the modal is disabled in all cases since the realm is on
limited plan.

For standard plans -
1. Owners can see and edit the dropdown in both stream creation
form and stream privacy modal. Non-owners cannot see the modal
in stream creation form but they can see the dropdown in stream
privacy modal and it will be disabled.

Thus, the only change in this commit is to disable the dropdown
in the stream creation form for owners and in limited plan realms.
The other behavior mentioned above was already there.
This commit is contained in:
sahil839 2021-04-07 22:22:22 +05:30 committed by Tim Abbott
parent c6f27440c6
commit 90a85ab442
1 changed files with 2 additions and 0 deletions

View File

@ -645,6 +645,8 @@ export function setup_page(callback) {
stream_edit.get_display_text_for_realm_message_retention_setting,
upgrade_text_for_wide_organization_logo:
page_params.upgrade_text_for_wide_organization_logo,
disable_message_retention_setting:
!page_params.zulip_plan_is_not_limited || !page_params.is_owner,
};
const rendered = render_subscription_table_body(template_data);