From 2b2a3b41be77cbf2b1131a5c6fcd7d12c51c1933 Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Tue, 24 Jan 2023 16:35:56 -0500 Subject: [PATCH] settings: Remove lock icon when the user can add bots. Being able to add bots at the admin bot settings page, the lock icon is unintuitive. Fixes #24154 Signed-off-by: Zixuan James Li --- web/src/settings.js | 1 + web/templates/settings_overlay.hbs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/settings.js b/web/src/settings.js index 65cab9767c..abaf12ac63 100644 --- a/web/src/settings.js +++ b/web/src/settings.js @@ -175,6 +175,7 @@ export function initialize() { show_uploaded_files_section: page_params.max_file_upload_size_mib > 0, show_emoji_settings_lock: !page_params.is_admin && page_params.realm_add_emoji_by_admins_only, + can_create_new_bots: settings_bots.can_create_new_bots(), }); $("#settings_overlay_container").append(rendered_settings_overlay); } diff --git a/web/templates/settings_overlay.hbs b/web/templates/settings_overlay.hbs index c13c8544be..9d0aa47e6c 100644 --- a/web/templates/settings_overlay.hbs +++ b/web/templates/settings_overlay.hbs @@ -127,7 +127,7 @@
  • {{t "Bots" }}
    - {{#unless is_admin}} + {{#unless can_create_new_bots}} {{/unless}}