guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmuehl...@apache.org
Subject [08/11] incubator-guacamole-client git commit: GUACAMOLE-292: Define and use standard attributes for user organization and role.
Date Sun, 28 May 2017 18:03:14 GMT
GUACAMOLE-292: Define and use standard attributes for user organization and role.


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

Branch: refs/heads/master
Commit: ee6edb9c82eb73b5c38c7ab13bd3750c80fd2c7f
Parents: 9634731
Author: Michael Jumper <mjumper@apache.org>
Authored: Fri Feb 24 01:54:41 2017 -0800
Committer: Michael Jumper <mjumper@apache.org>
Committed: Sat May 27 11:28:13 2017 -0700

----------------------------------------------------------------------
 .../guacamole/auth/jdbc/user/ModeledUser.java      | 16 +++++++++++++++-
 .../java/org/apache/guacamole/net/auth/User.java   | 11 +++++++++++
 guacamole/src/main/webapp/app/rest/types/User.js   | 17 ++++++++++++++++-
 guacamole/src/main/webapp/translations/en.json     |  6 ++++--
 4 files changed, 46 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ee6edb9c/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 c2c7f72..418fe80 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
@@ -114,7 +114,9 @@ public class ModeledUser extends ModeledDirectoryObject<UserModel>
implements Us
      */
     public static final Form PROFILE = new Form("profile", Arrays.<Field>asList(
         new TextField(User.Attribute.FULL_NAME),
-        new EmailField(User.Attribute.EMAIL_ADDRESS)
+        new EmailField(User.Attribute.EMAIL_ADDRESS),
+        new TextField(User.Attribute.ORGANIZATION),
+        new TextField(User.Attribute.ORGANIZATIONAL_ROLE)
     ));
 
     /**
@@ -400,6 +402,12 @@ public class ModeledUser extends ModeledDirectoryObject<UserModel>
implements Us
         // Set email address attribute
         attributes.put(User.Attribute.EMAIL_ADDRESS, "test@test.test"); // TODO
 
+        // Set organization attribute
+        attributes.put(User.Attribute.ORGANIZATION, "Example, Inc."); // TODO
+
+        // Set role attribute
+        attributes.put(User.Attribute.ORGANIZATIONAL_ROLE, "Senior Lead Architect"); // TODO
+
     }
 
     /**
@@ -523,6 +531,12 @@ public class ModeledUser extends ModeledDirectoryObject<UserModel>
implements Us
         // Translate email address attribute
         logger.info("EMAIL ADDRESS: \"{}\"", attributes.get(User.Attribute.EMAIL_ADDRESS));
// TODO
 
+        // Translate organization attribute
+        logger.info("ORGANIZATION: \"{}\"", attributes.get(User.Attribute.ORGANIZATION));
// TODO
+
+        // Translate role attribute
+        logger.info("ORGANIZATIONAL ROLE: \"{}\"", attributes.get(User.Attribute.ORGANIZATIONAL_ROLE));
// TODO
+
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ee6edb9c/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
index 1d36583..88756e4 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
@@ -49,6 +49,17 @@ public interface User extends Identifiable {
          */
         public static String EMAIL_ADDRESS = "guac-email-address";
 
+        /**
+         * The organization, company, group, etc. that the user belongs to.
+         */
+        public static String ORGANIZATION = "guac-organization";
+
+        /**
+         * The role that the user has at the organization, company, group, etc.
+         * they belong to.
+         */
+        public static String ORGANIZATIONAL_ROLE = "guac-organizational-role";
+
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ee6edb9c/guacamole/src/main/webapp/app/rest/types/User.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/types/User.js b/guacamole/src/main/webapp/app/rest/types/User.js
index b6df12b..9edd1f2 100644
--- a/guacamole/src/main/webapp/app/rest/types/User.js
+++ b/guacamole/src/main/webapp/app/rest/types/User.js
@@ -85,7 +85,22 @@ angular.module('rest').factory('User', [function defineUser() {
          *
          * @type String
          */
-        EMAIL_ADDRESS : 'guac-email-address'
+        EMAIL_ADDRESS : 'guac-email-address',
+
+        /**
+         * The organization, company, group, etc. that the user belongs to.
+         *
+         * @type String
+         */
+        ORGANIZATION : 'guac-organization',
+
+        /**
+         * The role that the user has at the organization, company, group, etc.
+         * they belong to.
+         *
+         * @type String
+         */
+        ORGANIZATIONAL_ROLE : 'guac-organizational-role'
 
     };
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ee6edb9c/guacamole/src/main/webapp/translations/en.json
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/translations/en.json b/guacamole/src/main/webapp/translations/en.json
index 79a7ea7..4995f54 100644
--- a/guacamole/src/main/webapp/translations/en.json
+++ b/guacamole/src/main/webapp/translations/en.json
@@ -699,8 +699,10 @@
 
     "USER_ATTRIBUTES" : {
 
-        "FIELD_HEADER_GUAC_EMAIL_ADDRESS" : "Email address:",
-        "FIELD_HEADER_GUAC_FULL_NAME"     : "Full name:"
+        "FIELD_HEADER_GUAC_EMAIL_ADDRESS"       : "Email address:",
+        "FIELD_HEADER_GUAC_FULL_NAME"           : "Full name:",
+        "FIELD_HEADER_GUAC_ORGANIZATION"        : "Organization:",
+        "FIELD_HEADER_GUAC_ORGANIZATIONAL_ROLE" : "Role:"
 
     },
 


Mime
View raw message