From d2db71fdf49a3fe38b88a0142de971a54bb37fb3 Mon Sep 17 00:00:00 2001 From: Ujjawal Modi Date: Sun, 26 Feb 2023 16:49:08 +0530 Subject: [PATCH] bots: Disable edit button for system bots. Disabled "Edit bot" and "Deactivate" action buttons for system bots as they cannot be edited or deactivated. Fixes #24425. --- web/src/settings_users.js | 2 ++ web/templates/settings/admin_user_list.hbs | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/web/src/settings_users.js b/web/src/settings_users.js index 7f3d555ff9..ee3906e284 100644 --- a/web/src/settings_users.js +++ b/web/src/settings_users.js @@ -230,6 +230,8 @@ function bot_info(bot_user_id) { info.is_current_user = false; info.can_modify = page_params.is_admin; + info.cannot_deactivate = bot_user.is_system_bot; + info.cannot_edit = bot_user.is_system_bot; // It's always safe to show the real email addresses for bot users info.display_email = bot_user.email; diff --git a/web/templates/settings/admin_user_list.hbs b/web/templates/settings/admin_user_list.hbs index 1a6f95b814..ee781cabf0 100644 --- a/web/templates/settings/admin_user_list.hbs +++ b/web/templates/settings/admin_user_list.hbs @@ -43,13 +43,17 @@ {{#if can_modify}} - + + + {{#if is_active}} - + + + {{else}}