mirror of https://github.com/zulip/zulip.git
ca57400771
Previously, if an admin created a private stream with shared history or a private stream with protected history, they would see the general tab for that stream in the right side of the subscriptions_overlay as expected, but, they would not see the pencil button to change stream privacy unless they clicked a different stream and came back. The reason for this has to do with how we receive events when we create a sub. We first get an event with type "stream" and op "create", we then get an event with type "subscription" and op "add" ie we create the stream and then sub ourselves to it. Now, we render `stream_settings.hbs` while handling the "stream create" event, at this time we pass `can_change_stream_permissions` as false since `(!sub.invite_only || sub.subscribed)` is false because we're not subscribed yet. This causes us to skip the insertion of the "change-stream-privacy" block which is a problem because when we're handling the "subscription add" event, we run `stream_ui_updates.update_change_stream_privacy_settings(sub)` which tries to show the element via `.show()` but can't since the element does not exist and as a result the admin user does not see the pencil edit button. This commit fixes the above bug by changing the template such that we always insert the button, but conditionally apply `style="display:none"`. Fixes: #20345. |
||
---|---|---|
.. | ||
browse_streams_list.hbs | ||
browse_streams_list_item.hbs | ||
change_stream_info_modal.hbs | ||
stream_creation_form.hbs | ||
stream_description.hbs | ||
stream_member_list_entry.hbs | ||
stream_members.hbs | ||
stream_permission_description.hbs | ||
stream_privacy_icon.hbs | ||
stream_settings.hbs | ||
stream_settings_checkbox.hbs | ||
stream_settings_overlay.hbs | ||
stream_subscription_request_result.hbs | ||
stream_types.hbs | ||
subscriber_count.hbs | ||
subscription_setting_icon.hbs |