From 8b443dc9d54ee3df5c8b4966b3be503b354f995a Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Sat, 2 Jun 2018 08:47:41 -0400 Subject: [PATCH] GUACAMOLE-422: Add timezone selection for RDP connections. --- .../org/apache/guacamole/auth/jdbc/user/ModeledUser.java | 6 +++++- .../main/resources/org/apache/guacamole/protocols/rdp.json | 4 ++++ guacamole/src/main/webapp/translations/en.json | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java index b7924edd9..a2e0fadbb 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java @@ -113,7 +113,8 @@ public class ModeledUser extends ModeledPermissions implements User { new TextField(User.Attribute.FULL_NAME), new EmailField(User.Attribute.EMAIL_ADDRESS), new TextField(User.Attribute.ORGANIZATION), - new TextField(User.Attribute.ORGANIZATIONAL_ROLE) + new TextField(User.Attribute.ORGANIZATIONAL_ROLE), + new TimeZoneField(TIMEZONE_ATTRIBUTE_NAME) )); /** @@ -349,6 +350,9 @@ public class ModeledUser extends ModeledPermissions implements User { // Set role attribute attributes.put(User.Attribute.ORGANIZATIONAL_ROLE, getModel().getOrganizationalRole()); + // Set timezone attribute + attributes.put(TIMEZONE_ATTRIBUTE_NAME, getModel().getTimeZone()); + } /** diff --git a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json index e3de15f40..f082ba28a 100644 --- a/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json +++ b/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json @@ -195,6 +195,10 @@ { "name" : "static-channels", "type" : "TEXT" + }, + { + "name" : "timezone", + "type" : "TIMEZONE" } ] }, diff --git a/guacamole/src/main/webapp/translations/en.json b/guacamole/src/main/webapp/translations/en.json index 9fc69efca..8815dd975 100644 --- a/guacamole/src/main/webapp/translations/en.json +++ b/guacamole/src/main/webapp/translations/en.json @@ -415,6 +415,7 @@ "FIELD_HEADER_REMOTE_APP_ARGS" : "Parameters:", "FIELD_HEADER_REMOTE_APP_DIR" : "Working directory:", "FIELD_HEADER_REMOTE_APP" : "Program:", + "FIELD_HEADER_TIMEZONE" : "Timezone:", "FIELD_HEADER_SECURITY" : "Security mode:", "FIELD_HEADER_SERVER_LAYOUT" : "Keyboard layout:", "FIELD_HEADER_SFTP_DIRECTORY" : "Default upload directory:",