From 4a98eb205d53c32660bb88f128067cf5582a8506 Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Thu, 8 Feb 2024 12:33:38 +0530 Subject: [PATCH] settings: Fix check_property_changed code for user access setting. The proposed_val for "realm_can_access_all_users_group" setting was always returning NaN value which resulted in the value being included in request even when it was not changed or disabled due to org not being on "Plus" plan. This resulted in a bug where user was not allowed to change the "guest" indicator setting on orgs without "Plus" plan. For orgs with "Plus" plan there was no problem in changing the setting but the save button was visible incorrectly if the setting was set to the initial value. This commit fixes both the bugs. --- web/src/settings_components.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/settings_components.js b/web/src/settings_components.js index 01e137c1cf..485d477b1f 100644 --- a/web/src/settings_components.js +++ b/web/src/settings_components.js @@ -510,6 +510,7 @@ export function check_property_changed(elem, for_realm_default_settings, sub, gr case "can_remove_subscribers_group": case "realm_create_multiuse_invite_group": case "can_mention_group": + case "realm_can_access_all_users_group": proposed_val = get_dropdown_list_widget_setting_value($elem); break; case "email_notifications_batching_period_seconds":