Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/master be3bc6cde -> 3beedd10a


GUACAMOLE-292: Store user profile information within PostgreSQL/MySQL database.


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/a34d3fac
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/a34d3fac
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/a34d3fac

Branch: refs/heads/master
Commit: a34d3facc4c99354d4262101e9c516f36b25c675
Parents: 06fb054
Author: Michael Jumper <mjum...@apache.org>
Authored: Tue Mar 7 13:23:13 2017 -0800
Committer: Michael Jumper <mjum...@apache.org>
Committed: Sat May 27 11:28:13 2017 -0700

----------------------------------------------------------------------
 .../guacamole/auth/jdbc/user/ModeledUser.java   |  16 +--
 .../guacamole/auth/jdbc/user/UserModel.java     | 111 +++++++++++++++++++
 .../schema/001-create-schema.sql                |   6 +
 .../schema/upgrade/upgrade-pre-0.9.13.sql       |  10 ++
 .../guacamole/auth/jdbc/user/UserMapper.xml     |  62 ++++++++---
 .../schema/001-create-schema.sql                |   6 +
 .../schema/upgrade/upgrade-pre-0.9.13.sql       |  10 ++
 .../guacamole/auth/jdbc/user/UserMapper.xml     |  64 ++++++++---
 8 files changed, 242 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/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 418fe80..418ffad 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
@@ -397,16 +397,16 @@ public class ModeledUser extends 
ModeledDirectoryObject<UserModel> implements Us
     private void putUnrestrictedAttributes(Map<String, String> attributes) {
 
         // Set full name attribute
-        attributes.put(User.Attribute.FULL_NAME, "Testy McTesterson"); // TODO
+        attributes.put(User.Attribute.FULL_NAME, getModel().getFullName());
 
         // Set email address attribute
-        attributes.put(User.Attribute.EMAIL_ADDRESS, "t...@test.test"); // TODO
+        attributes.put(User.Attribute.EMAIL_ADDRESS, 
getModel().getEmailAddress());
 
         // Set organization attribute
-        attributes.put(User.Attribute.ORGANIZATION, "Example, Inc."); // TODO
+        attributes.put(User.Attribute.ORGANIZATION, 
getModel().getOrganization());
 
         // Set role attribute
-        attributes.put(User.Attribute.ORGANIZATIONAL_ROLE, "Senior Lead 
Architect"); // TODO
+        attributes.put(User.Attribute.ORGANIZATIONAL_ROLE, 
getModel().getOrganizationalRole());
 
     }
 
@@ -526,16 +526,16 @@ public class ModeledUser extends 
ModeledDirectoryObject<UserModel> implements Us
     private void setUnrestrictedAttributes(Map<String, String> attributes) {
 
         // Translate full name attribute
-        logger.info("FULL NAME: \"{}\"", 
attributes.get(User.Attribute.FULL_NAME)); // TODO
+        getModel().setFullName(attributes.get(User.Attribute.FULL_NAME));
 
         // Translate email address attribute
-        logger.info("EMAIL ADDRESS: \"{}\"", 
attributes.get(User.Attribute.EMAIL_ADDRESS)); // TODO
+        
getModel().setEmailAddress(attributes.get(User.Attribute.EMAIL_ADDRESS));
 
         // Translate organization attribute
-        logger.info("ORGANIZATION: \"{}\"", 
attributes.get(User.Attribute.ORGANIZATION)); // TODO
+        
getModel().setOrganization(attributes.get(User.Attribute.ORGANIZATION));
 
         // Translate role attribute
-        logger.info("ORGANIZATIONAL ROLE: \"{}\"", 
attributes.get(User.Attribute.ORGANIZATIONAL_ROLE)); // TODO
+        
getModel().setOrganizationalRole(attributes.get(User.Attribute.ORGANIZATIONAL_ROLE));
 
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserModel.java
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserModel.java
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserModel.java
index 4dfb275..2376cae 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserModel.java
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserModel.java
@@ -93,6 +93,28 @@ public class UserModel extends ObjectModel {
     private String timeZone;
 
     /**
+     * The user's full name, or null if this is not known.
+     */
+    private String fullName;
+
+    /**
+     * The email address of the user, or null if this is not known.
+     */
+    private String emailAddress;
+
+    /**
+     * The organization, company, group, etc. that the user belongs to, or null
+     * if this is not known.
+     */
+    private String organization;
+
+    /**
+     * The role that the user has at the organization, company, group, etc.
+     * they belong to, or null if this is not known.
+     */
+    private String organizationalRole;
+
+    /**
      * Creates a new, empty user.
      */
     public UserModel() {
@@ -351,4 +373,93 @@ public class UserModel extends ObjectModel {
         this.timeZone = timeZone;
     }
 
+    /**
+     * Returns the user's full name, if known. If not available, null is
+     * returned.
+     *
+     * @return
+     *     The user's full name, or null if this is not known.
+     */
+    public String getFullName() {
+        return fullName;
+    }
+
+    /**
+     * Sets the user's full name.
+     *
+     * @param fullName
+     *     The user's full name, or null if this is not known.
+     */
+    public void setFullName(String fullName) {
+        this.fullName = fullName;
+    }
+
+    /**
+     * Returns the email address of the user, if known. If not available, null
+     * is returned.
+     *
+     * @return
+     *     The email address of the user, or null if this is not known.
+     */
+    public String getEmailAddress() {
+        return emailAddress;
+    }
+
+    /**
+     * Sets the email address of the user.
+     *
+     * @param emailAddress
+     *     The email address of the user, or null if this is not known.
+     */
+    public void setEmailAddress(String emailAddress) {
+        this.emailAddress = emailAddress;
+    }
+
+    /**
+     * Returns the organization, company, group, etc. that the user belongs to,
+     * if known. If not available, null is returned.
+     *
+     * @return
+     *     The organization, company, group, etc. that the user belongs to, or
+     *     null if this is not known.
+     */
+    public String getOrganization() {
+        return organization;
+    }
+
+    /**
+     * Sets the organization, company, group, etc. that the user belongs to.
+     *
+     * @param organization
+     *     The organization, company, group, etc. that the user belongs to, or
+     *     null if this is not known.
+     */
+    public void setOrganization(String organization) {
+        this.organization = organization;
+    }
+
+    /**
+     * Returns the role that the user has at the organization, company, group,
+     * etc. they belong to. If not available, null is returned.
+     *
+     * @return
+     *     The role that the user has at the organization, company, group, etc.
+     *     they belong to, or null if this is not known.
+     */
+    public String getOrganizationalRole() {
+        return organizationalRole;
+    }
+
+    /**
+     * Sets the role that the user has at the organization, company, group,
+     * etc. they belong to.
+     *
+     * @param organizationalRole
+     *     The role that the user has at the organization, company, group, etc.
+     *     they belong to, or null if this is not known.
+     */
+    public void setOrganizationalRole(String organizationalRole) {
+        this.organizationalRole = organizationalRole;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/001-create-schema.sql
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/001-create-schema.sql
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/001-create-schema.sql
index 37a8259..29bc47a 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/001-create-schema.sql
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/001-create-schema.sql
@@ -102,6 +102,12 @@ CREATE TABLE `guacamole_user` (
   -- Timezone used for all date/time comparisons and interpretation
   `timezone` VARCHAR(64),
 
+  -- Profile information
+  `full_name`           VARCHAR(256),
+  `email_address`       VARCHAR(256),
+  `organization`        VARCHAR(256),
+  `organizational_role` VARCHAR(256),
+
   PRIMARY KEY (`user_id`),
   UNIQUE KEY `username` (`username`)
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/upgrade/upgrade-pre-0.9.13.sql
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/upgrade/upgrade-pre-0.9.13.sql
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/upgrade/upgrade-pre-0.9.13.sql
index bb37c6c..95bbc1c 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/upgrade/upgrade-pre-0.9.13.sql
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/schema/upgrade/upgrade-pre-0.9.13.sql
@@ -28,3 +28,13 @@ ALTER TABLE guacamole_connection ADD COLUMN 
proxy_encryption_method ENUM(
     'NONE',
     'SSL'
 );
+
+--
+-- Add new user profile columns
+--
+
+ALTER TABLE guacamole_user ADD COLUMN full_name           VARCHAR(256);
+ALTER TABLE guacamole_user ADD COLUMN email_address       VARCHAR(256);
+ALTER TABLE guacamole_user ADD COLUMN organization        VARCHAR(256);
+ALTER TABLE guacamole_user ADD COLUMN organizational_role VARCHAR(256);
+

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
index 3530b0b..0ddb051 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
@@ -25,17 +25,21 @@
 
     <!-- Result mapper for user objects -->
     <resultMap id="UserResultMap" 
type="org.apache.guacamole.auth.jdbc.user.UserModel" >
-        <id     column="user_id"             property="objectID"          
jdbcType="INTEGER"/>
-        <result column="username"            property="identifier"        
jdbcType="VARCHAR"/>
-        <result column="password_hash"       property="passwordHash"      
jdbcType="BINARY"/>
-        <result column="password_salt"       property="passwordSalt"      
jdbcType="BINARY"/>
-        <result column="password_date"       property="passwordDate"      
jdbcType="TIMESTAMP"/>
-        <result column="disabled"            property="disabled"          
jdbcType="BOOLEAN"/>
-        <result column="access_window_start" property="accessWindowStart" 
jdbcType="TIME"/>
-        <result column="access_window_end"   property="accessWindowEnd"   
jdbcType="TIME"/>
-        <result column="valid_from"          property="validFrom"         
jdbcType="DATE"/>
-        <result column="valid_until"         property="validUntil"        
jdbcType="DATE"/>
-        <result column="timezone"            property="timeZone"          
jdbcType="VARCHAR"/>
+        <id     column="user_id"             property="objectID"           
jdbcType="INTEGER"/>
+        <result column="username"            property="identifier"         
jdbcType="VARCHAR"/>
+        <result column="password_hash"       property="passwordHash"       
jdbcType="BINARY"/>
+        <result column="password_salt"       property="passwordSalt"       
jdbcType="BINARY"/>
+        <result column="password_date"       property="passwordDate"       
jdbcType="TIMESTAMP"/>
+        <result column="disabled"            property="disabled"           
jdbcType="BOOLEAN"/>
+        <result column="access_window_start" property="accessWindowStart"  
jdbcType="TIME"/>
+        <result column="access_window_end"   property="accessWindowEnd"    
jdbcType="TIME"/>
+        <result column="valid_from"          property="validFrom"          
jdbcType="DATE"/>
+        <result column="valid_until"         property="validUntil"         
jdbcType="DATE"/>
+        <result column="timezone"            property="timeZone"           
jdbcType="VARCHAR"/>
+        <result column="full_name"           property="fullName"           
jdbcType="VARCHAR"/>
+        <result column="email_address"       property="emailAddress"       
jdbcType="VARCHAR"/>
+        <result column="organization"        property="organization"       
jdbcType="VARCHAR"/>
+        <result column="organizational_role" property="organizationalRole" 
jdbcType="VARCHAR"/>
     </resultMap>
 
     <!-- Select all usernames -->
@@ -69,7 +73,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         FROM guacamole_user
         WHERE username IN
             <foreach collection="identifiers" item="identifier"
@@ -94,7 +102,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         FROM guacamole_user
         JOIN guacamole_user_permission ON affected_user_id = 
guacamole_user.user_id
         WHERE username IN
@@ -122,7 +134,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         FROM guacamole_user
         WHERE
             username = #{username,jdbcType=VARCHAR}
@@ -150,7 +166,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         )
         VALUES (
             #{object.identifier,jdbcType=VARCHAR},
@@ -163,7 +183,11 @@
             #{object.accessWindowEnd,jdbcType=TIME},
             #{object.validFrom,jdbcType=DATE},
             #{object.validUntil,jdbcType=DATE},
-            #{object.timeZone,jdbcType=VARCHAR}
+            #{object.timeZone,jdbcType=VARCHAR},
+            #{object.fullName,jdbcType=VARCHAR},
+            #{object.emailAddress,jdbcType=VARCHAR},
+            #{object.organization,jdbcType=VARCHAR},
+            #{object.organizationalRole,jdbcType=VARCHAR}
         )
 
     </insert>
@@ -180,7 +204,11 @@
             access_window_end = #{object.accessWindowEnd,jdbcType=TIME},
             valid_from = #{object.validFrom,jdbcType=DATE},
             valid_until = #{object.validUntil,jdbcType=DATE},
-            timezone = #{object.timeZone,jdbcType=VARCHAR}
+            timezone = #{object.timeZone,jdbcType=VARCHAR},
+            full_name = #{object.fullName,jdbcType=VARCHAR},
+            email_address = #{object.emailAddress,jdbcType=VARCHAR},
+            organization = #{object.organization,jdbcType=VARCHAR},
+            organizational_role = #{object.organizationalRole,jdbcType=VARCHAR}
         WHERE user_id = #{object.objectID,jdbcType=VARCHAR}
     </update>
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/001-create-schema.sql
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/001-create-schema.sql
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/001-create-schema.sql
index 199b4bd..f9b2351 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/001-create-schema.sql
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/001-create-schema.sql
@@ -143,6 +143,12 @@ CREATE TABLE guacamole_user (
   -- Timezone used for all date/time comparisons and interpretation
   timezone varchar(64),
 
+  -- Profile information
+  full_name           varchar(256),
+  email_address       varchar(256),
+  organization        varchar(256),
+  organizational_role varchar(256),
+
   PRIMARY KEY (user_id),
 
   CONSTRAINT username

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/upgrade/upgrade-pre-0.9.13.sql
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/upgrade/upgrade-pre-0.9.13.sql
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/upgrade/upgrade-pre-0.9.13.sql
index 015ec9a..0fac528 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/upgrade/upgrade-pre-0.9.13.sql
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/upgrade/upgrade-pre-0.9.13.sql
@@ -33,3 +33,13 @@ CREATE TYPE guacamole_proxy_encryption_method AS ENUM(
 ALTER TABLE guacamole_connection ADD COLUMN proxy_port integer;
 ALTER TABLE guacamole_connection ADD COLUMN proxy_hostname varchar(512);
 ALTER TABLE guacamole_connection ADD COLUMN proxy_encryption_method 
guacamole_proxy_encryption_method;
+
+--
+-- Add new user profile columns
+--
+
+ALTER TABLE guacamole_user ADD COLUMN full_name           VARCHAR(256);
+ALTER TABLE guacamole_user ADD COLUMN email_address       VARCHAR(256);
+ALTER TABLE guacamole_user ADD COLUMN organization        VARCHAR(256);
+ALTER TABLE guacamole_user ADD COLUMN organizational_role VARCHAR(256);
+

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a34d3fac/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
----------------------------------------------------------------------
diff --git 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
index 39ec05a..569a8ac 100644
--- 
a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
+++ 
b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml
@@ -25,18 +25,22 @@
 
     <!-- Result mapper for user objects -->
     <resultMap id="UserResultMap" 
type="org.apache.guacamole.auth.jdbc.user.UserModel" >
-        <id     column="user_id"             property="objectID"          
jdbcType="INTEGER"/>
-        <result column="username"            property="identifier"        
jdbcType="VARCHAR"/>
-        <result column="password_hash"       property="passwordHash"      
jdbcType="BINARY"/>
-        <result column="password_salt"       property="passwordSalt"      
jdbcType="BINARY"/>
-        <result column="password_date"       property="passwordDate"      
jdbcType="TIMESTAMP"/>
-        <result column="disabled"            property="disabled"          
jdbcType="BOOLEAN"/>
-        <result column="expired"             property="expired"           
jdbcType="BOOLEAN"/>
-        <result column="access_window_start" property="accessWindowStart" 
jdbcType="TIME"/>
-        <result column="access_window_end"   property="accessWindowEnd"   
jdbcType="TIME"/>
-        <result column="valid_from"          property="validFrom"         
jdbcType="DATE"/>
-        <result column="valid_until"         property="validUntil"        
jdbcType="DATE"/>
-        <result column="timezone"            property="timeZone"          
jdbcType="VARCHAR"/>
+        <id     column="user_id"             property="objectID"           
jdbcType="INTEGER"/>
+        <result column="username"            property="identifier"         
jdbcType="VARCHAR"/>
+        <result column="password_hash"       property="passwordHash"       
jdbcType="BINARY"/>
+        <result column="password_salt"       property="passwordSalt"       
jdbcType="BINARY"/>
+        <result column="password_date"       property="passwordDate"       
jdbcType="TIMESTAMP"/>
+        <result column="disabled"            property="disabled"           
jdbcType="BOOLEAN"/>
+        <result column="expired"             property="expired"            
jdbcType="BOOLEAN"/>
+        <result column="access_window_start" property="accessWindowStart"  
jdbcType="TIME"/>
+        <result column="access_window_end"   property="accessWindowEnd"    
jdbcType="TIME"/>
+        <result column="valid_from"          property="validFrom"          
jdbcType="DATE"/>
+        <result column="valid_until"         property="validUntil"         
jdbcType="DATE"/>
+        <result column="timezone"            property="timeZone"           
jdbcType="VARCHAR"/>
+        <result column="full_name"           property="fullName"           
jdbcType="VARCHAR"/>
+        <result column="email_address"       property="emailAddress"       
jdbcType="VARCHAR"/>
+        <result column="organization"        property="organization"       
jdbcType="VARCHAR"/>
+        <result column="organizational_role" property="organizationalRole" 
jdbcType="VARCHAR"/>
     </resultMap>
 
     <!-- Select all usernames -->
@@ -70,7 +74,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         FROM guacamole_user
         WHERE username IN
             <foreach collection="identifiers" item="identifier"
@@ -95,7 +103,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         FROM guacamole_user
         JOIN guacamole_user_permission ON affected_user_id = 
guacamole_user.user_id
         WHERE username IN
@@ -123,7 +135,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         FROM guacamole_user
         WHERE
             username = #{username,jdbcType=VARCHAR}
@@ -151,7 +167,11 @@
             access_window_end,
             valid_from,
             valid_until,
-            timezone
+            timezone,
+            full_name,
+            email_address,
+            organization,
+            organizational_role
         )
         VALUES (
             #{object.identifier,jdbcType=VARCHAR},
@@ -164,7 +184,11 @@
             #{object.accessWindowEnd,jdbcType=TIME},
             #{object.validFrom,jdbcType=DATE},
             #{object.validUntil,jdbcType=DATE},
-            #{object.timeZone,jdbcType=VARCHAR}
+            #{object.timeZone,jdbcType=VARCHAR},
+            #{object.fullName,jdbcType=VARCHAR},
+            #{object.emailAddress,jdbcType=VARCHAR},
+            #{object.organization,jdbcType=VARCHAR},
+            #{object.organizationalRole,jdbcType=VARCHAR}
         )
 
     </insert>
@@ -181,7 +205,11 @@
             access_window_end = #{object.accessWindowEnd,jdbcType=TIME},
             valid_from = #{object.validFrom,jdbcType=DATE},
             valid_until = #{object.validUntil,jdbcType=DATE},
-            timezone = #{object.timeZone,jdbcType=VARCHAR}
+            timezone = #{object.timeZone,jdbcType=VARCHAR},
+            full_name = #{object.fullName,jdbcType=VARCHAR},
+            email_address = #{object.emailAddress,jdbcType=VARCHAR},
+            organization = #{object.organization,jdbcType=VARCHAR},
+            organizational_role = #{object.organizationalRole,jdbcType=VARCHAR}
         WHERE user_id = #{object.objectID,jdbcType=VARCHAR}
     </update>
 

Reply via email to