settings: Use new group setting to check web-public stream creation.

This commit updates code in webapp to use new group-based setting
for checking web-public stream creation permission.
This commit is contained in:
Sahil Batra
2024-07-26 09:12:14 +05:30
committed by Tim Abbott
parent e71c3007f6
commit 506ead4468
13 changed files with 71 additions and 133 deletions

View File

@@ -205,7 +205,6 @@ export function dispatch_normal_event(event) {
avatar_changes_disabled: settings_account.update_avatar_change_display,
bot_creation_policy: settings_bots.update_bot_permissions_ui,
create_multiuse_invite_group: noop,
create_web_public_stream_policy: noop,
invite_to_stream_policy: noop,
default_code_block_language: noop,
default_language: noop,
@@ -266,12 +265,9 @@ export function dispatch_normal_event(event) {
gear_menu.rerender();
}
if (
event.property === "create_web_public_stream_policy" ||
event.property === "enable_spectator_access"
) {
if (event.property === "enable_spectator_access") {
stream_settings_ui.update_stream_privacy_choices(
"create_web_public_stream_policy",
"can_create_web_public_channel_group",
);
}
}
@@ -293,7 +289,8 @@ export function dispatch_normal_event(event) {
if (
key === "can_create_public_channel_group" ||
key === "can_create_private_channel_group"
key === "can_create_private_channel_group" ||
key === "can_create_web_public_channel_group"
) {
stream_settings_ui.update_stream_privacy_choices(key);
}