Allow modification of user vm details if user.vm.readonly.details is empty

This commit is contained in:
Pearl Dsilva 2025-02-24 14:03:53 -05:00 committed by dahn
parent 25f93b1d6b
commit dec53f7974
2 changed files with 4 additions and 1 deletions

View File

@ -242,3 +242,6 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'manag
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vmware.hung.wokervm.timeout', '7200', 'Worker VM timeout in seconds');
INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 'management-server', "alert.smtp.connectiontimeout", "30000", "Socket connection timeout value in milliseconds. -1 for infinite timeout.");
INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Alert", 'DEFAULT', 'management-server', "alert.smtp.timeout", "30000", "Socket I/O timeout value in milliseconds. -1 for infinite timeout.");
-- Update the value of user.vm.readonly.details record in the configuration table to "" if it is NULL
UPDATE `cloud`.`configuration` SET value = '' WHERE name = 'user.vm.readonly.details' AND value IS NULL;

View File

@ -1006,7 +1006,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
value = value.trim();
if (value.isEmpty() || value.equals("null")) {
value = (id == null) ? null : "";
value = (id == null && !name.equals("user.vm.readonly.details")) ? null : "";
}
final String updatedValue = updateConfiguration(userId, name, category, value, scope, id);