aleitner commented on code in PR #783:
URL: https://github.com/apache/guacamole-client/pull/783#discussion_r1058585791
##########
guacamole/src/main/java/org/apache/guacamole/rest/user/UserResource.java:
##########
@@ -150,6 +150,10 @@ public void updateObject(APIUser modifiedObject) throws
GuacamoleException {
throw e;
}
+ /* Force updateObject to save the timezone when it is empty */
+ if (modifiedObject.getAttributes().get("timezone") == null)
+ modifiedObject.getAttributes().put("timezone", "");
+
Review Comment:
Upon saving the User preferences when the timezone is set to be empty, User
Resource's `updateObject` get's called. This leads to the UserObjectTranslator
performing a filter on the user object. The user object has attributes on it
and any attributes that are `null` get filtered out. Meaning anything that has
a `null` value does not get updated. Setting the attribute as an empty string
will prevent the `timezone` attribute from being filtered out and thus allows a
`timezone` to be set to empty.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]