You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2017/06/28 12:12:18 UTC

[1/4] incubator-guacamole-client git commit: GUACAMOLE-320: Ensure blank values for the new text attributes of users and connections are properly interpreted.

Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/master 303be24cc -> 5d1399413


GUACAMOLE-320: Ensure blank values for the new text attributes of users and connections are properly interpreted.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/f7e64878
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/f7e64878
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/f7e64878

Branch: refs/heads/master
Commit: f7e648787e3af84a73c7abbcd5a60cf4425291bd
Parents: ed066c8
Author: Michael Jumper <mj...@apache.org>
Authored: Tue Jun 27 16:06:47 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Jun 27 16:31:29 2017 -0700

----------------------------------------------------------------------
 .../guacamole/auth/jdbc/connection/ModeledConnection.java    | 4 ++--
 .../org/apache/guacamole/auth/jdbc/user/ModeledUser.java     | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/f7e64878/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java
index bcd7b11..7a7162e 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java
@@ -285,8 +285,8 @@ public class ModeledConnection extends ModeledChildDirectoryObject<ConnectionMod
             logger.debug("Unable to parse numeric attribute.", e);
         }
 
-        // Set guacd hostname (no translation necessary)
-        getModel().setProxyHostname(attributes.get(GUACD_HOSTNAME_NAME));
+        // Translate guacd hostname
+        getModel().setProxyHostname(TextField.parse(attributes.get(GUACD_HOSTNAME_NAME)));
 
         // Translate guacd port
         try { getModel().setProxyPort(NumericField.parse(attributes.get(GUACD_PORT_NAME))); }

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/f7e64878/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java
----------------------------------------------------------------------
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 418ffad..cab45c8 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
@@ -526,16 +526,16 @@ public class ModeledUser extends ModeledDirectoryObject<UserModel> implements Us
     private void setUnrestrictedAttributes(Map<String, String> attributes) {
 
         // Translate full name attribute
-        getModel().setFullName(attributes.get(User.Attribute.FULL_NAME));
+        getModel().setFullName(TextField.parse(attributes.get(User.Attribute.FULL_NAME)));
 
         // Translate email address attribute
-        getModel().setEmailAddress(attributes.get(User.Attribute.EMAIL_ADDRESS));
+        getModel().setEmailAddress(TextField.parse(attributes.get(User.Attribute.EMAIL_ADDRESS)));
 
         // Translate organization attribute
-        getModel().setOrganization(attributes.get(User.Attribute.ORGANIZATION));
+        getModel().setOrganization(TextField.parse(attributes.get(User.Attribute.ORGANIZATION)));
 
         // Translate role attribute
-        getModel().setOrganizationalRole(attributes.get(User.Attribute.ORGANIZATIONAL_ROLE));
+        getModel().setOrganizationalRole(TextField.parse(attributes.get(User.Attribute.ORGANIZATIONAL_ROLE)));
 
     }
 


[2/4] incubator-guacamole-client git commit: GUACAMOLE-320: Add parse() convenience function for TextField which interprets empty strings as equivalent to null.

Posted by vn...@apache.org.
GUACAMOLE-320: Add parse() convenience function for TextField which interprets empty strings as equivalent to null.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/ed066c88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/ed066c88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/ed066c88

Branch: refs/heads/master
Commit: ed066c88e7b4b544ff3f597cd597aca2a76cf9cd
Parents: 04c70c7
Author: Michael Jumper <mj...@apache.org>
Authored: Tue Jun 27 15:58:59 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Jun 27 16:31:29 2017 -0700

----------------------------------------------------------------------
 .../org/apache/guacamole/form/TextField.java    | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ed066c88/guacamole-ext/src/main/java/org/apache/guacamole/form/TextField.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/form/TextField.java b/guacamole-ext/src/main/java/org/apache/guacamole/form/TextField.java
index 0880771..2751e14 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/form/TextField.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/form/TextField.java
@@ -35,4 +35,25 @@ public class TextField extends Field {
         super(name, Field.Type.TEXT);
     }
 
+    /**
+     * Parses the given string, interpreting empty strings as equivalent to
+     * null. For all other cases, the given string is returned verbatim.
+     *
+     * @param str
+     *     The string to parse, which may be null.
+     *
+     * @return
+     *     The given string, or null if the given string was null or empty.
+     */
+    public static String parse(String str) {
+
+        // Return null if no value provided
+        if (str == null || str.isEmpty())
+            return null;
+
+        // Otherwise, return string unmodified
+        return str;
+
+    }
+
 }


[3/4] incubator-guacamole-client git commit: GUACAMOLE-320: Merge Ensure blank values for text attributes are interpreted equivalently to null.

Posted by vn...@apache.org.
GUACAMOLE-320: Merge Ensure blank values for text attributes are interpreted equivalently to null.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/de12b683
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/de12b683
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/de12b683

Branch: refs/heads/master
Commit: de12b683d746129ddc8b34425ed6e40b618c91d6
Parents: b217455 f7e6487
Author: Nick Couchman <vn...@apache.org>
Authored: Wed Jun 28 08:04:31 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Wed Jun 28 08:04:31 2017 -0400

----------------------------------------------------------------------
 .../auth/jdbc/connection/ModeledConnection.java |  4 ++--
 .../guacamole/auth/jdbc/user/ModeledUser.java   |  8 ++++----
 .../org/apache/guacamole/form/TextField.java    | 21 ++++++++++++++++++++
 3 files changed, 27 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[4/4] incubator-guacamole-client git commit: Merge 0.9.13-incubating changes back to master.

Posted by vn...@apache.org.
Merge 0.9.13-incubating changes back to master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/5d139941
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/5d139941
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/5d139941

Branch: refs/heads/master
Commit: 5d1399413b2153cb9d8f94a57501c92d1ef95c20
Parents: 303be24 de12b68
Author: Nick Couchman <vn...@apache.org>
Authored: Wed Jun 28 08:10:19 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Wed Jun 28 08:10:19 2017 -0400

----------------------------------------------------------------------
 .../auth/jdbc/connection/ModeledConnection.java |  4 ++--
 .../guacamole/auth/jdbc/user/ModeledUser.java   |  8 ++++----
 .../org/apache/guacamole/form/TextField.java    | 21 ++++++++++++++++++++
 3 files changed, 27 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5d139941/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ModeledConnection.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5d139941/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java
----------------------------------------------------------------------