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.
This commit is contained in:
Sahil Batra 2024-02-08 12:33:38 +05:30
parent ae9ef830f0
commit 4a98eb205d
1 changed files with 1 additions and 0 deletions

View File

@ -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":