mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
stream settings: Allow org admin to update settings of unsub-stream.
As per backend validations.
This commit is contained in:
@@ -325,6 +325,12 @@ function change_stream_privacy(e) {
|
|||||||
|
|
||||||
redraw_privacy_related_stuff(sub_row, sub);
|
redraw_privacy_related_stuff(sub_row, sub);
|
||||||
$("#stream_privacy_modal").remove();
|
$("#stream_privacy_modal").remove();
|
||||||
|
|
||||||
|
// For auto update, without rendering whole template
|
||||||
|
stream_data.update_calculated_fields(sub);
|
||||||
|
if (!sub.can_change_subscription_type) {
|
||||||
|
$(".change-stream-privacy").hide();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
$("#change-stream-privacy-button").text(i18n.t("Try again"));
|
$("#change-stream-privacy-button").text(i18n.t("Try again"));
|
||||||
|
|||||||
@@ -270,7 +270,9 @@ exports.create_sidebar_row = function (sub) {
|
|||||||
exports.redraw_stream_privacy = function (sub) {
|
exports.redraw_stream_privacy = function (sub) {
|
||||||
var li = exports.get_stream_li(sub.stream_id);
|
var li = exports.get_stream_li(sub.stream_id);
|
||||||
if (!li) {
|
if (!li) {
|
||||||
blueslip.error('passed in bad stream: ' + sub.name);
|
// We don't want to raise error here, if we can't find stream in subscription
|
||||||
|
// stream list. Cause we allow org admin to update stream privacy
|
||||||
|
// even if they don't subscribe to public stream.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user