[3/4] guacamole-server git commit: GUACAMOLE-559: Merge fix race condition in receipt of clipboard data by terminal.

2018-07-31 Thread vnick
GUACAMOLE-559: Merge fix race condition in receipt of clipboard data by 
terminal.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/427c4c8b
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/427c4c8b
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/427c4c8b

Branch: refs/heads/master
Commit: 427c4c8b44b0ee218c605ff9da409bcae56f6744
Parents: 71f993b 4f25410
Author: Nick Couchman 
Authored: Tue Jul 31 08:10:47 2018 -0400
Committer: Nick Couchman 
Committed: Tue Jul 31 08:10:47 2018 -0400

--
 src/common/clipboard.c   | 28 ++--
 src/common/common/clipboard.h|  8 
 src/protocols/ssh/client.c   |  5 +
 src/protocols/ssh/client.h   |  5 +
 src/protocols/ssh/clipboard.c|  5 +++--
 src/protocols/ssh/ssh.c  |  2 +-
 src/protocols/ssh/ssh.h  |  6 ++
 src/protocols/telnet/client.c|  4 
 src/protocols/telnet/client.h|  5 +
 src/protocols/telnet/clipboard.c |  5 +++--
 src/protocols/telnet/telnet.c|  1 +
 src/protocols/telnet/telnet.h|  6 ++
 src/terminal/terminal.c  | 16 ++--
 src/terminal/terminal/terminal.h | 29 -
 14 files changed, 87 insertions(+), 38 deletions(-)
--




[4/4] guacamole-server git commit: Merge 1.0.0 changes back to master.

2018-07-31 Thread vnick
Merge 1.0.0 changes back to master.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/0062f61d
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/0062f61d
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/0062f61d

Branch: refs/heads/master
Commit: 0062f61d67163537929d699541356cdce3b36519
Parents: d8cb221 427c4c8
Author: Nick Couchman 
Authored: Tue Jul 31 08:12:30 2018 -0400
Committer: Nick Couchman 
Committed: Tue Jul 31 08:12:30 2018 -0400

--
 src/common/clipboard.c   | 28 ++--
 src/common/common/clipboard.h|  8 
 src/protocols/ssh/client.c   |  5 +
 src/protocols/ssh/client.h   |  5 +
 src/protocols/ssh/clipboard.c|  5 +++--
 src/protocols/ssh/ssh.c  |  2 +-
 src/protocols/ssh/ssh.h  |  6 ++
 src/protocols/telnet/client.c|  4 
 src/protocols/telnet/client.h|  5 +
 src/protocols/telnet/clipboard.c |  5 +++--
 src/protocols/telnet/telnet.c|  1 +
 src/protocols/telnet/telnet.h|  6 ++
 src/terminal/terminal.c  | 16 ++--
 src/terminal/terminal/terminal.h | 29 -
 14 files changed, 87 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0062f61d/src/terminal/terminal.c
--

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0062f61d/src/terminal/terminal/terminal.h
--



[1/4] guacamole-server git commit: GUACAMOLE-559: Guarantee ordered modification to the clipboard. Do not allow modification of clipboard while clipboard contents are being sent.

2018-07-31 Thread vnick
Repository: guacamole-server
Updated Branches:
  refs/heads/master d8cb2218e -> 0062f61d6


GUACAMOLE-559: Guarantee ordered modification to the clipboard. Do not allow 
modification of clipboard while clipboard contents are being sent.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/4f25410a
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/4f25410a
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/4f25410a

Branch: refs/heads/master
Commit: 4f25410aa9ec6914d20c4f1b529ddefcd3e4392e
Parents: 860a5fc
Author: Michael Jumper 
Authored: Mon Jul 30 23:20:14 2018 -0700
Committer: Michael Jumper 
Committed: Mon Jul 30 23:53:03 2018 -0700

--
 src/common/clipboard.c| 28 ++--
 src/common/common/clipboard.h |  8 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/4f25410a/src/common/clipboard.c
--
diff --git a/src/common/clipboard.c b/src/common/clipboard.c
index 4452bee..eb2f548 100644
--- a/src/common/clipboard.c
+++ b/src/common/clipboard.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -37,6 +38,8 @@ guac_common_clipboard* guac_common_clipboard_alloc(int size) {
 clipboard->length = 0;
 clipboard->available = size;
 
+pthread_mutex_init(&(clipboard->lock), NULL);
+
 return clipboard;
 
 }
@@ -108,18 +111,37 @@ static void* __send_user_clipboard(guac_user* user, void* 
data) {
 }
 
 void guac_common_clipboard_send(guac_common_clipboard* clipboard, guac_client* 
client) {
+
+pthread_mutex_lock(&(clipboard->lock));
+
 guac_client_log(client, GUAC_LOG_DEBUG, "Broadcasting clipboard to all 
connected users.");
 guac_client_foreach_user(client, __send_user_clipboard, clipboard);
 guac_client_log(client, GUAC_LOG_DEBUG, "Broadcast of clipboard 
complete.");
+
+pthread_mutex_unlock(&(clipboard->lock));
+
 }
 
-void guac_common_clipboard_reset(guac_common_clipboard* clipboard, const char* 
mimetype) {
+void guac_common_clipboard_reset(guac_common_clipboard* clipboard,
+const char* mimetype) {
+
+pthread_mutex_lock(&(clipboard->lock));
+
+/* Clear clipboard contents */
 clipboard->length = 0;
-strncpy(clipboard->mimetype, mimetype, sizeof(clipboard->mimetype)-1);
+
+/* Assign given mimetype */
+strncpy(clipboard->mimetype, mimetype, sizeof(clipboard->mimetype) - 1);
+clipboard->mimetype[sizeof(clipboard->mimetype) - 1] = '\0';
+
+pthread_mutex_unlock(&(clipboard->lock));
+
 }
 
 void guac_common_clipboard_append(guac_common_clipboard* clipboard, const 
char* data, int length) {
 
+pthread_mutex_lock(&(clipboard->lock));
+
 /* Truncate data to available length */
 int remaining = clipboard->available - clipboard->length;
 if (remaining < length)
@@ -131,5 +153,7 @@ void guac_common_clipboard_append(guac_common_clipboard* 
clipboard, const char*
 /* Update length */
 clipboard->length += length;
 
+pthread_mutex_unlock(&(clipboard->lock));
+
 }
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/4f25410a/src/common/common/clipboard.h
--
diff --git a/src/common/common/clipboard.h b/src/common/common/clipboard.h
index 5ebb261..c129a7c 100644
--- a/src/common/common/clipboard.h
+++ b/src/common/common/clipboard.h
@@ -23,6 +23,7 @@
 #include "config.h"
 
 #include 
+#include 
 
 /**
  * The maximum number of bytes to send in an individual blob when
@@ -36,6 +37,13 @@
 typedef struct guac_common_clipboard {
 
 /**
+ * Lock which restricts simultaneous access to the clipboard, guaranteeing
+ * ordered modifications to the clipboard and that changes to the clipboard
+ * are not allowed while the clipboard is being broadcast to all users.
+ */
+pthread_mutex_t lock;
+
+/**
  * The mimetype of the contained clipboard data.
  */
 char mimetype[256];



[2/4] guacamole-server git commit: GUACAMOLE-559: Maintain terminal clipboard at client level such that it is guaranteed to exist immediately after user connects.

2018-07-31 Thread vnick
GUACAMOLE-559: Maintain terminal clipboard at client level such that it is 
guaranteed to exist immediately after user connects.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/860a5fca
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/860a5fca
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/860a5fca

Branch: refs/heads/master
Commit: 860a5fca8f98ae13fcbcce07ef24766c0d93
Parents: 71f993b
Author: Michael Jumper 
Authored: Mon Jul 30 23:01:27 2018 -0700
Committer: Michael Jumper 
Committed: Mon Jul 30 23:53:03 2018 -0700

--
 src/protocols/ssh/client.c   |  5 +
 src/protocols/ssh/client.h   |  5 +
 src/protocols/ssh/clipboard.c|  5 +++--
 src/protocols/ssh/ssh.c  |  2 +-
 src/protocols/ssh/ssh.h  |  6 ++
 src/protocols/telnet/client.c|  4 
 src/protocols/telnet/client.h|  5 +
 src/protocols/telnet/clipboard.c |  5 +++--
 src/protocols/telnet/telnet.c|  1 +
 src/protocols/telnet/telnet.h|  6 ++
 src/terminal/terminal.c  | 16 ++--
 src/terminal/terminal/terminal.h | 29 -
 12 files changed, 53 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/client.c
--
diff --git a/src/protocols/ssh/client.c b/src/protocols/ssh/client.c
index 47b5978..25e8e5b 100644
--- a/src/protocols/ssh/client.c
+++ b/src/protocols/ssh/client.c
@@ -20,6 +20,7 @@
 #include "config.h"
 
 #include "client.h"
+#include "common/clipboard.h"
 #include "common/recording.h"
 #include "common-ssh/sftp.h"
 #include "ssh.h"
@@ -42,6 +43,9 @@ int guac_client_init(guac_client* client) {
 guac_ssh_client* ssh_client = calloc(1, sizeof(guac_ssh_client));
 client->data = ssh_client;
 
+/* Init clipboard */
+ssh_client->clipboard = 
guac_common_clipboard_alloc(GUAC_SSH_CLIPBOARD_MAX_LENGTH);
+
 /* Set handlers */
 client->join_handler = guac_ssh_user_join_handler;
 client->free_handler = guac_ssh_client_free_handler;
@@ -106,6 +110,7 @@ int guac_ssh_client_free_handler(guac_client* client) {
 guac_ssh_settings_free(ssh_client->settings);
 
 /* Free client structure */
+guac_common_clipboard_free(ssh_client->clipboard);
 free(ssh_client);
 
 guac_common_ssh_uninit();

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/client.h
--
diff --git a/src/protocols/ssh/client.h b/src/protocols/ssh/client.h
index a759e81..551cb7a 100644
--- a/src/protocols/ssh/client.h
+++ b/src/protocols/ssh/client.h
@@ -23,6 +23,11 @@
 #include 
 
 /**
+ * The maximum number of bytes to allow within the clipboard.
+ */
+#define GUAC_SSH_CLIPBOARD_MAX_LENGTH 262144
+
+/**
  * Handler which is invoked when the SSH client needs to be disconnected (if
  * connected) and freed. This can happen if initialization fails, or all users
  * have left the connection.

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/clipboard.c
--
diff --git a/src/protocols/ssh/clipboard.c b/src/protocols/ssh/clipboard.c
index 0e23632..72e1ca0 100644
--- a/src/protocols/ssh/clipboard.c
+++ b/src/protocols/ssh/clipboard.c
@@ -19,6 +19,7 @@
 
 #include "config.h"
 #include "clipboard.h"
+#include "common/clipboard.h"
 #include "ssh.h"
 #include "terminal/terminal.h"
 
@@ -32,7 +33,7 @@ int guac_ssh_clipboard_handler(guac_user* user, guac_stream* 
stream,
 /* Clear clipboard and prepare for new data */
 guac_client* client = user->client;
 guac_ssh_client* ssh_client = (guac_ssh_client*) client->data;
-guac_terminal_clipboard_reset(ssh_client->term, mimetype);
+guac_common_clipboard_reset(ssh_client->clipboard, mimetype);
 
 /* Set handlers for clipboard stream */
 stream->blob_handler = guac_ssh_clipboard_blob_handler;
@@ -47,7 +48,7 @@ int guac_ssh_clipboard_blob_handler(guac_user* user, 
guac_stream* stream,
 /* Append new data */
 guac_client* client = user->client;
 guac_ssh_client* ssh_client = (guac_ssh_client*) client->data;
-guac_terminal_clipboard_append(ssh_client->term, data, length);
+guac_common_clipboard_append(ssh_client->clipboard, data, length);
 
 return 0;
 }

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/ssh.c
--
diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c
index f98f222..a116281 100644
--- a/src/protocols/ssh/ssh.c
+++ 

[1/3] guacamole-server git commit: GUACAMOLE-559: Guarantee ordered modification to the clipboard. Do not allow modification of clipboard while clipboard contents are being sent.

2018-07-31 Thread vnick
Repository: guacamole-server
Updated Branches:
  refs/heads/staging/1.0.0 71f993b25 -> 427c4c8b4


GUACAMOLE-559: Guarantee ordered modification to the clipboard. Do not allow 
modification of clipboard while clipboard contents are being sent.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/4f25410a
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/4f25410a
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/4f25410a

Branch: refs/heads/staging/1.0.0
Commit: 4f25410aa9ec6914d20c4f1b529ddefcd3e4392e
Parents: 860a5fc
Author: Michael Jumper 
Authored: Mon Jul 30 23:20:14 2018 -0700
Committer: Michael Jumper 
Committed: Mon Jul 30 23:53:03 2018 -0700

--
 src/common/clipboard.c| 28 ++--
 src/common/common/clipboard.h |  8 
 2 files changed, 34 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/4f25410a/src/common/clipboard.c
--
diff --git a/src/common/clipboard.c b/src/common/clipboard.c
index 4452bee..eb2f548 100644
--- a/src/common/clipboard.c
+++ b/src/common/clipboard.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -37,6 +38,8 @@ guac_common_clipboard* guac_common_clipboard_alloc(int size) {
 clipboard->length = 0;
 clipboard->available = size;
 
+pthread_mutex_init(&(clipboard->lock), NULL);
+
 return clipboard;
 
 }
@@ -108,18 +111,37 @@ static void* __send_user_clipboard(guac_user* user, void* 
data) {
 }
 
 void guac_common_clipboard_send(guac_common_clipboard* clipboard, guac_client* 
client) {
+
+pthread_mutex_lock(&(clipboard->lock));
+
 guac_client_log(client, GUAC_LOG_DEBUG, "Broadcasting clipboard to all 
connected users.");
 guac_client_foreach_user(client, __send_user_clipboard, clipboard);
 guac_client_log(client, GUAC_LOG_DEBUG, "Broadcast of clipboard 
complete.");
+
+pthread_mutex_unlock(&(clipboard->lock));
+
 }
 
-void guac_common_clipboard_reset(guac_common_clipboard* clipboard, const char* 
mimetype) {
+void guac_common_clipboard_reset(guac_common_clipboard* clipboard,
+const char* mimetype) {
+
+pthread_mutex_lock(&(clipboard->lock));
+
+/* Clear clipboard contents */
 clipboard->length = 0;
-strncpy(clipboard->mimetype, mimetype, sizeof(clipboard->mimetype)-1);
+
+/* Assign given mimetype */
+strncpy(clipboard->mimetype, mimetype, sizeof(clipboard->mimetype) - 1);
+clipboard->mimetype[sizeof(clipboard->mimetype) - 1] = '\0';
+
+pthread_mutex_unlock(&(clipboard->lock));
+
 }
 
 void guac_common_clipboard_append(guac_common_clipboard* clipboard, const 
char* data, int length) {
 
+pthread_mutex_lock(&(clipboard->lock));
+
 /* Truncate data to available length */
 int remaining = clipboard->available - clipboard->length;
 if (remaining < length)
@@ -131,5 +153,7 @@ void guac_common_clipboard_append(guac_common_clipboard* 
clipboard, const char*
 /* Update length */
 clipboard->length += length;
 
+pthread_mutex_unlock(&(clipboard->lock));
+
 }
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/4f25410a/src/common/common/clipboard.h
--
diff --git a/src/common/common/clipboard.h b/src/common/common/clipboard.h
index 5ebb261..c129a7c 100644
--- a/src/common/common/clipboard.h
+++ b/src/common/common/clipboard.h
@@ -23,6 +23,7 @@
 #include "config.h"
 
 #include 
+#include 
 
 /**
  * The maximum number of bytes to send in an individual blob when
@@ -36,6 +37,13 @@
 typedef struct guac_common_clipboard {
 
 /**
+ * Lock which restricts simultaneous access to the clipboard, guaranteeing
+ * ordered modifications to the clipboard and that changes to the clipboard
+ * are not allowed while the clipboard is being broadcast to all users.
+ */
+pthread_mutex_t lock;
+
+/**
  * The mimetype of the contained clipboard data.
  */
 char mimetype[256];



[2/3] guacamole-server git commit: GUACAMOLE-559: Maintain terminal clipboard at client level such that it is guaranteed to exist immediately after user connects.

2018-07-31 Thread vnick
GUACAMOLE-559: Maintain terminal clipboard at client level such that it is 
guaranteed to exist immediately after user connects.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/860a5fca
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/860a5fca
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/860a5fca

Branch: refs/heads/staging/1.0.0
Commit: 860a5fca8f98ae13fcbcce07ef24766c0d93
Parents: 71f993b
Author: Michael Jumper 
Authored: Mon Jul 30 23:01:27 2018 -0700
Committer: Michael Jumper 
Committed: Mon Jul 30 23:53:03 2018 -0700

--
 src/protocols/ssh/client.c   |  5 +
 src/protocols/ssh/client.h   |  5 +
 src/protocols/ssh/clipboard.c|  5 +++--
 src/protocols/ssh/ssh.c  |  2 +-
 src/protocols/ssh/ssh.h  |  6 ++
 src/protocols/telnet/client.c|  4 
 src/protocols/telnet/client.h|  5 +
 src/protocols/telnet/clipboard.c |  5 +++--
 src/protocols/telnet/telnet.c|  1 +
 src/protocols/telnet/telnet.h|  6 ++
 src/terminal/terminal.c  | 16 ++--
 src/terminal/terminal/terminal.h | 29 -
 12 files changed, 53 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/client.c
--
diff --git a/src/protocols/ssh/client.c b/src/protocols/ssh/client.c
index 47b5978..25e8e5b 100644
--- a/src/protocols/ssh/client.c
+++ b/src/protocols/ssh/client.c
@@ -20,6 +20,7 @@
 #include "config.h"
 
 #include "client.h"
+#include "common/clipboard.h"
 #include "common/recording.h"
 #include "common-ssh/sftp.h"
 #include "ssh.h"
@@ -42,6 +43,9 @@ int guac_client_init(guac_client* client) {
 guac_ssh_client* ssh_client = calloc(1, sizeof(guac_ssh_client));
 client->data = ssh_client;
 
+/* Init clipboard */
+ssh_client->clipboard = 
guac_common_clipboard_alloc(GUAC_SSH_CLIPBOARD_MAX_LENGTH);
+
 /* Set handlers */
 client->join_handler = guac_ssh_user_join_handler;
 client->free_handler = guac_ssh_client_free_handler;
@@ -106,6 +110,7 @@ int guac_ssh_client_free_handler(guac_client* client) {
 guac_ssh_settings_free(ssh_client->settings);
 
 /* Free client structure */
+guac_common_clipboard_free(ssh_client->clipboard);
 free(ssh_client);
 
 guac_common_ssh_uninit();

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/client.h
--
diff --git a/src/protocols/ssh/client.h b/src/protocols/ssh/client.h
index a759e81..551cb7a 100644
--- a/src/protocols/ssh/client.h
+++ b/src/protocols/ssh/client.h
@@ -23,6 +23,11 @@
 #include 
 
 /**
+ * The maximum number of bytes to allow within the clipboard.
+ */
+#define GUAC_SSH_CLIPBOARD_MAX_LENGTH 262144
+
+/**
  * Handler which is invoked when the SSH client needs to be disconnected (if
  * connected) and freed. This can happen if initialization fails, or all users
  * have left the connection.

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/clipboard.c
--
diff --git a/src/protocols/ssh/clipboard.c b/src/protocols/ssh/clipboard.c
index 0e23632..72e1ca0 100644
--- a/src/protocols/ssh/clipboard.c
+++ b/src/protocols/ssh/clipboard.c
@@ -19,6 +19,7 @@
 
 #include "config.h"
 #include "clipboard.h"
+#include "common/clipboard.h"
 #include "ssh.h"
 #include "terminal/terminal.h"
 
@@ -32,7 +33,7 @@ int guac_ssh_clipboard_handler(guac_user* user, guac_stream* 
stream,
 /* Clear clipboard and prepare for new data */
 guac_client* client = user->client;
 guac_ssh_client* ssh_client = (guac_ssh_client*) client->data;
-guac_terminal_clipboard_reset(ssh_client->term, mimetype);
+guac_common_clipboard_reset(ssh_client->clipboard, mimetype);
 
 /* Set handlers for clipboard stream */
 stream->blob_handler = guac_ssh_clipboard_blob_handler;
@@ -47,7 +48,7 @@ int guac_ssh_clipboard_blob_handler(guac_user* user, 
guac_stream* stream,
 /* Append new data */
 guac_client* client = user->client;
 guac_ssh_client* ssh_client = (guac_ssh_client*) client->data;
-guac_terminal_clipboard_append(ssh_client->term, data, length);
+guac_common_clipboard_append(ssh_client->clipboard, data, length);
 
 return 0;
 }

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/860a5fca/src/protocols/ssh/ssh.c
--
diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c
index f98f222..a116281 100644
--- a/src/protocols/ssh/ssh.c
+++ 

[3/3] guacamole-server git commit: GUACAMOLE-559: Merge fix race condition in receipt of clipboard data by terminal.

2018-07-31 Thread vnick
GUACAMOLE-559: Merge fix race condition in receipt of clipboard data by 
terminal.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/427c4c8b
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/427c4c8b
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/427c4c8b

Branch: refs/heads/staging/1.0.0
Commit: 427c4c8b44b0ee218c605ff9da409bcae56f6744
Parents: 71f993b 4f25410
Author: Nick Couchman 
Authored: Tue Jul 31 08:10:47 2018 -0400
Committer: Nick Couchman 
Committed: Tue Jul 31 08:10:47 2018 -0400

--
 src/common/clipboard.c   | 28 ++--
 src/common/common/clipboard.h|  8 
 src/protocols/ssh/client.c   |  5 +
 src/protocols/ssh/client.h   |  5 +
 src/protocols/ssh/clipboard.c|  5 +++--
 src/protocols/ssh/ssh.c  |  2 +-
 src/protocols/ssh/ssh.h  |  6 ++
 src/protocols/telnet/client.c|  4 
 src/protocols/telnet/client.h|  5 +
 src/protocols/telnet/clipboard.c |  5 +++--
 src/protocols/telnet/telnet.c|  1 +
 src/protocols/telnet/telnet.h|  6 ++
 src/terminal/terminal.c  | 16 ++--
 src/terminal/terminal/terminal.h | 29 -
 14 files changed, 87 insertions(+), 38 deletions(-)
--




[03/12] guacamole-client git commit: GUACAMOLE-220: Implement generic editor directive for manipulating sets of identifiers.

2018-08-14 Thread vnick
GUACAMOLE-220: Implement generic editor directive for manipulating sets of 
identifiers.


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

Branch: refs/heads/staging/1.0.0
Commit: 229b0dee4882352e7583c4f5872bee92158da712
Parents: 1cf16d1
Author: Michael Jumper 
Authored: Wed Jul 25 02:34:27 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../manage/directives/identifierSetEditor.js| 267 +++
 .../app/manage/styles/related-objects.css   |  82 ++
 .../manage/templates/identifierSetEditor.html   |  46 
 .../src/main/webapp/images/arrows/right.png | Bin 0 -> 264 bytes
 guacamole/src/main/webapp/images/x-red.png  | Bin 0 -> 583 bytes
 5 files changed, 395 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/229b0dee/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js 
b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
new file mode 100644
index 000..82f1109
--- /dev/null
+++ b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * A directive for manipulating a set of objects sharing some common relation
+ * and represented by an array of their identifiers. The specific objects
+ * added or removed are tracked within a separate pair of arrays of
+ * identifiers.
+ */
+angular.module('manage').directive('identifierSetEditor', ['$injector',
+function identifierSetEditor($injector) {
+
+var directive = {
+
+// Element only
+restrict: 'E',
+replace: true,
+
+scope: {
+
+/**
+ * The translation key of the text which should be displayed within
+ * the main header of the identifier set editor.
+ *
+ * @type String
+ */
+header : '@',
+
+/**
+ * The translation key of the text which should be displayed if no
+ * identifiers are currently present within the set.
+ *
+ * @type String
+ */
+emptyPlaceholder : '@',
+
+/**
+ * The translation key of the text which should be displayed if no
+ * identifiers are available to be added within the set.
+ *
+ * @type String
+ */
+unavailablePlaceholder : '@',
+
+/**
+ * All identifiers which are available to be added to or removed
+ * from the identifier set being edited.
+ *
+ * @type String[]
+ */
+identifiersAvailable : '=',
+
+/**
+ * The current state of the identifier set being manipulated. This
+ * array will be modified as changes are made through this
+ * identifier set editor.
+ *
+ * @type String[]
+ */
+identifiers : '=',
+
+/**
+ * The set of identifiers that have been added, relative to the
+ * initial state of the identifier set being manipulated.
+ *
+ * @type String[]
+ */
+identifiersAdded : '=',
+
+/**
+ * The set of identifiers that have been removed, relative to the
+ * initial state of the identifier set being manipulated.
+ *
+ * @type String[]
+ */
+identifiersRemoved : '='
+
+},
+
+templateUrl: 'app/manage/templates/identifierSetEditor.html'
+
+};
+
+

[05/12] guacamole-client git commit: GUACAMOLE-220: Allow manipulation and retrieval of user group permissions via JavaScript.

2018-08-14 Thread vnick
GUACAMOLE-220: Allow manipulation and retrieval of user group permissions via 
JavaScript.


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

Branch: refs/heads/staging/1.0.0
Commit: 55bcf25a1c53f85ba2383fc83b46e2bc2ccd05af
Parents: 9f01fcb
Author: Michael Jumper 
Authored: Thu Apr 19 14:39:04 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../app/rest/services/permissionService.js  | 91 +---
 .../webapp/app/rest/types/PermissionFlagSet.js  | 23 -
 .../main/webapp/app/rest/types/PermissionSet.js | 82 +-
 3 files changed, 163 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/55bcf25a/guacamole/src/main/webapp/app/rest/services/permissionService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/permissionService.js 
b/guacamole/src/main/webapp/app/rest/services/permissionService.js
index 6d3dfdf..21c5a02 100644
--- a/guacamole/src/main/webapp/app/rest/services/permissionService.js
+++ b/guacamole/src/main/webapp/app/rest/services/permissionService.js
@@ -45,6 +45,11 @@ angular.module('rest').factory('permissionService', 
['$injector',
  * within that data source (and thus cannot be found beneath
  * "api/session/data/{dataSource}/users")
  *
+ * NOTE: Unlike getPermissionsResourceURL(),
+ * getEffectivePermissionsResourceURL() CANNOT be applied to user groups.
+ * Only users have retrievable effective permissions as far as the REST API
+ * is concerned.
+ *
  * @param {String} dataSource
  * The unique identifier of the data source containing the user whose
  * permissions should be retrieved. This identifier corresponds to an
@@ -82,6 +87,10 @@ angular.module('rest').factory('permissionService', 
['$injector',
  * from the permissions returned via getPermissions() in that permissions
  * which are not directly granted to the user are included.
  *
+ * NOTE: Unlike getPermissions(), getEffectivePermissions() CANNOT be
+ * applied to user groups. Only users have retrievable effective
+ * permissions as far as the REST API is concerned.
+ *
  * @param {String} dataSource
  * The unique identifier of the data source containing the user whose
  * permissions should be retrieved. This identifier corresponds to an
@@ -113,10 +122,10 @@ angular.module('rest').factory('permissionService', 
['$injector',
 
 /**
  * Returns the URL for the REST resource most appropriate for accessing
- * the permissions of the user having the given identifier. The permissions
- * retrieved differ from effective permissions (those returned by
- * getEffectivePermissions()) in that only permissions which are directly
- * granted to the user are included.
+ * the permissions of the user or group having the given identifier. The
+ * permissions retrieved differ from effective permissions (those returned
+ * by getEffectivePermissions()) in that only permissions which are 
directly
+ * granted to the user or group are included.
  * 
  * It is important to note that a particular data source can authenticate
  * and provide permissions for a user, even if that user does not exist
@@ -129,18 +138,27 @@ angular.module('rest').factory('permissionService', 
['$injector',
  * AuthenticationProvider within the Guacamole web application.
  *
  * @param {String} identifier
- * The identifier of the user for which the URL of the proper REST
- * resource should be derived.
+ * The identifier of the user or group for which the URL of the proper
+ * REST resource should be derived.
+ *
+ * @param {Boolean} [group]
+ * Whether the provided identifier refers to a user group. If false or
+ * omitted, the identifier given is assumed to refer to a user.
  *
  * @returns {String}
- * The URL for the REST resource representing the user having the given
- * identifier.
+ * The URL for the REST resource representing the user or group having
+ * the given identifier.
  */
-var getPermissionsResourceURL = function 
getPermissionsResourceURL(dataSource, identifier) {
+var getPermissionsResourceURL = function 
getPermissionsResourceURL(dataSource, identifier, group) {
 
 // Create base URL for data source
 var base = 'api/session/data/' + encodeURIComponent(dataSource);
 
+// Access 

[10/12] guacamole-client git commit: GUACAMOLE-220: Add management tab and editor for user groups.

2018-08-14 Thread vnick
GUACAMOLE-220: Add management tab and editor for user groups.


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

Branch: refs/heads/staging/1.0.0
Commit: 8ad3f2537119d61becad38558dc1365742ba7444
Parents: de80957
Author: Michael Jumper 
Authored: Thu Apr 19 23:51:25 2018 -0700
Committer: Michael Jumper 
Committed: Thu Aug 9 10:46:06 2018 -0700

--
 .../webapp/app/index/config/indexRouteConfig.js |   9 +
 .../src/main/webapp/app/index/styles/lists.css  |   4 +
 .../src/main/webapp/app/index/styles/ui.css |   8 +
 .../controllers/manageUserGroupController.js| 538 +++
 .../manage/directives/systemPermissionEditor.js |   4 +
 .../app/manage/styles/manage-user-group.css |  71 +++
 .../app/manage/templates/manageUserGroup.html   | 101 
 .../app/manage/types/ManageableUserGroup.js |  53 ++
 .../app/navigation/services/userPageService.js  |  27 +
 .../settings/controllers/settingsController.js  |   4 +-
 .../directives/guacSettingsUserGroups.js| 270 ++
 .../main/webapp/app/settings/styles/buttons.css |   6 +
 .../app/settings/styles/user-group-list.css |  36 ++
 .../webapp/app/settings/templates/settings.html |   1 +
 .../settings/templates/settingsUserGroups.html  |  48 ++
 .../images/action-icons/guac-user-group-add.png | Bin 0 -> 1222 bytes
 .../images/user-icons/guac-user-group.png   | Bin 0 -> 1428 bytes
 guacamole/src/main/webapp/translations/en.json  |  67 ++-
 18 files changed, 1244 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8ad3f253/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
--
diff --git a/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js 
b/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
index 47bc48e..5a8c3fb 100644
--- a/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
+++ b/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
@@ -171,6 +171,15 @@ angular.module('index').config(['$routeProvider', 
'$locationProvider',
 resolve   : { updateCurrentToken: updateCurrentToken }
 })
 
+// User group editor
+.when('/manage/:dataSource/userGroups/:id?', {
+title : 'APP.NAME',
+bodyClassName : 'manage',
+templateUrl   : 'app/manage/templates/manageUserGroup.html',
+controller: 'manageUserGroupController',
+resolve   : { updateCurrentToken: updateCurrentToken }
+})
+
 // Client view
 .when('/client/:id/:params?', {
 bodyClassName : 'client',

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8ad3f253/guacamole/src/main/webapp/app/index/styles/lists.css
--
diff --git a/guacamole/src/main/webapp/app/index/styles/lists.css 
b/guacamole/src/main/webapp/app/index/styles/lists.css
index 0c761ae..80df491 100644
--- a/guacamole/src/main/webapp/app/index/styles/lists.css
+++ b/guacamole/src/main/webapp/app/index/styles/lists.css
@@ -18,12 +18,14 @@
  */
 
 .user,
+.user-group,
 .connection-group,
 .connection {
 cursor: pointer;
 }
 
 .user a,
+.user-group a,
 .connection a,
 .connection-group a {
 text-decoration:none;
@@ -31,6 +33,7 @@
 }
 
 .user a:hover,
+.user-group a:hover,
 .connection a:hover,
 .connection-group a:hover {
 text-decoration:none;
@@ -38,6 +41,7 @@
 }
 
 .user a:visited,
+.user-group a:visited,
 .connection a:visited,
 .connection-group a:visited {
 text-decoration:none;

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8ad3f253/guacamole/src/main/webapp/app/index/styles/ui.css
--
diff --git a/guacamole/src/main/webapp/app/index/styles/ui.css 
b/guacamole/src/main/webapp/app/index/styles/ui.css
index 434f443..58406eb 100644
--- a/guacamole/src/main/webapp/app/index/styles/ui.css
+++ b/guacamole/src/main/webapp/app/index/styles/ui.css
@@ -156,6 +156,14 @@ div.section {
 background-image: url('images/action-icons/guac-user-add.png');
 }
 
+.icon.user-group {
+background-image: url('images/user-icons/guac-user-group.png');
+}
+
+.icon.user-group.add {
+background-image: url('images/action-icons/guac-user-group-add.png');
+}
+
 .icon.connection {
 background-image: url('images/protocol-icons/guac-plug.png');
 }


[09/12] guacamole-client git commit: GUACAMOLE-220: Select from multiple datasources deterministically.

2018-08-14 Thread vnick
GUACAMOLE-220: Select from multiple datasources deterministically.

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

Branch: refs/heads/staging/1.0.0
Commit: 6aaef7685f8b455bc4b7854d8aef8617a3d7b4f1
Parents: 8ad3f25
Author: Michael Jumper 
Authored: Wed Aug 8 22:56:07 2018 -0700
Committer: Michael Jumper 
Committed: Thu Aug 9 10:46:06 2018 -0700

--
 .../src/main/webapp/app/manage/directives/dataSourceTabs.js | 5 -
 .../webapp/app/settings/directives/guacSettingsUserGroups.js| 4 +++-
 .../main/webapp/app/settings/directives/guacSettingsUsers.js| 4 +++-
 3 files changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6aaef768/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
--
diff --git a/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js 
b/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
index cf7068f..627197b 100644
--- a/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
+++ b/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
@@ -76,9 +76,12 @@ angular.module('manage').directive('dataSourceTabs', 
['$injector',
 $scope.$watch('permissions', function permissionsChanged(permissions) {
 
 $scope.pages = [];
-angular.forEach(permissions, function 
addDataSourcePage(managementPermissions, dataSource) {
+
+var dataSources = _.keys($scope.permissions).sort();
+angular.forEach(dataSources, function 
addDataSourcePage(dataSource) {
 
 // Determine whether data source contains this object
+var managementPermissions = permissions[dataSource];
 var exists = !!managementPermissions.identifier;
 
 // Data source is not relevant if the associated object does 
not

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6aaef768/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
--
diff --git 
a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js 
b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
index 5d45bc1..a8f2dd3 100644
--- 
a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
+++ 
b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
@@ -119,9 +119,11 @@ 
angular.module('settings').directive('guacSettingsUserGroups', ['$injector',
 return null;
 
 // For each data source
-for (var dataSource in permissions) {
+var dataSources = _.keys(permissions).sort();
+for (var i = 0; i < dataSources.length; i++) {
 
 // Retrieve corresponding permission set
+var dataSource = dataSources[i];
 var permissionSet = permissions[dataSource];
 
 // Can create user groups if adminstrator or have explicit 
permission

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6aaef768/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
--
diff --git 
a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js 
b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
index 870a862..4adf04e 100644
--- a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
+++ b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
@@ -150,9 +150,11 @@ angular.module('settings').directive('guacSettingsUsers', 
[function guacSettings
 return null;
 
 // For each data source
-for (var dataSource in $scope.permissions) {
+var dataSources = _.keys($scope.permissions).sort();
+for (var i = 0; i < dataSources.length; i++) {
 
 // Retrieve corresponding permission set
+var dataSource = dataSources[i];
 var permissionSet = $scope.permissions[dataSource];
 
 // Can create users if adminstrator or have explicit 
permission



[04/12] guacamole-client git commit: GUACAMOLE-220: Add missing getUserGroupAttributes() to JavaScript schemaService.

2018-08-14 Thread vnick
GUACAMOLE-220: Add missing getUserGroupAttributes() to JavaScript schemaService.


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

Branch: refs/heads/staging/1.0.0
Commit: 615f5c6bab28f78884cf42fb29c76ad44822a33d
Parents: 55bcf25
Author: Michael Jumper 
Authored: Thu Apr 19 23:21:17 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../webapp/app/rest/services/schemaService.js   | 34 
 1 file changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/615f5c6b/guacamole/src/main/webapp/app/rest/services/schemaService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/schemaService.js 
b/guacamole/src/main/webapp/app/rest/services/schemaService.js
index cc871d8..61c8639 100644
--- a/guacamole/src/main/webapp/app/rest/services/schemaService.js
+++ b/guacamole/src/main/webapp/app/rest/services/schemaService.js
@@ -66,6 +66,40 @@ angular.module('rest').factory('schemaService', ['$injector',
 
 /**
  * Makes a request to the REST API to get the list of available attributes
+ * for user group objects, returning a promise that provides an array of
+ * @link{Form} objects if successful. Each element of the array describes
+ * a logical grouping of possible attributes.
+ *
+ * @param {String} dataSource
+ * The unique identifier of the data source containing the user groups
+ * whose available attributes are to be retrieved. This identifier
+ * corresponds to an AuthenticationProvider within the Guacamole web
+ * application.
+ *
+ * @returns {Promise.}
+ * A promise which will resolve with an array of @link{Form}
+ * objects, where each @link{Form} describes a logical grouping of
+ * possible attributes.
+ */
+service.getUserGroupAttributes = function 
getUserGroupAttributes(dataSource) {
+
+// Build HTTP parameters set
+var httpParameters = {
+token : authenticationService.getCurrentToken()
+};
+
+// Retrieve available user group attributes
+return requestService({
+cache   : cacheService.schema,
+method  : 'GET',
+url : 'api/session/data/' + encodeURIComponent(dataSource) + 
'/schema/userGroupAttributes',
+params  : httpParameters
+});
+
+};
+
+/**
+ * Makes a request to the REST API to get the list of available attributes
  * for connection objects, returning a promise that provides an array of
  * @link{Form} objects if successful. Each element of the array describes
  * a logical grouping of possible attributes.



[11/12] guacamole-client git commit: GUACAMOLE-220: Allow attributes to be specified via the template supplied to REST object constructors, for consistency's sake.

2018-08-14 Thread vnick
GUACAMOLE-220: Allow attributes to be specified via the template supplied to 
REST object constructors, for consistency's sake.

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

Branch: refs/heads/staging/1.0.0
Commit: 7917f46b36fb04565c0e1d4119c0136c8f987fcd
Parents: 6aaef76
Author: Michael Jumper 
Authored: Thu Aug 9 10:43:46 2018 -0700
Committer: Michael Jumper 
Committed: Thu Aug 9 10:46:06 2018 -0700

--
 guacamole/src/main/webapp/app/rest/types/Connection.js  | 2 +-
 guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js | 2 +-
 guacamole/src/main/webapp/app/rest/types/SharingProfile.js  | 2 +-
 guacamole/src/main/webapp/app/rest/types/User.js| 2 +-
 guacamole/src/main/webapp/app/rest/types/UserGroup.js   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/Connection.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/Connection.js 
b/guacamole/src/main/webapp/app/rest/types/Connection.js
index 76ece9d..89da4e1 100644
--- a/guacamole/src/main/webapp/app/rest/types/Connection.js
+++ b/guacamole/src/main/webapp/app/rest/types/Connection.js
@@ -84,7 +84,7 @@ angular.module('rest').factory('Connection', [function 
defineConnection() {
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 /**
  * The count of currently active connections using this connection.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js 
b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
index a40dba1..6da754c 100644
--- a/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
+++ b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
@@ -95,7 +95,7 @@ angular.module('rest').factory('ConnectionGroup', [function 
defineConnectionGrou
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 /**
  * The count of currently active connections using this connection

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/SharingProfile.js 
b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
index ea8287d..50f1307 100644
--- a/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
+++ b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
@@ -76,7 +76,7 @@ angular.module('rest').factory('SharingProfile', [function 
defineSharingProfile(
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 };
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/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 f796147..3ca138d 100644
--- a/guacamole/src/main/webapp/app/rest/types/User.js
+++ b/guacamole/src/main/webapp/app/rest/types/User.js
@@ -69,7 +69,7 @@ angular.module('rest').factory('User', [function defineUser() 
{
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 };
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/UserGroup.js 
b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
index 03b73e2..f4bf26c 100644
--- a/guacamole/src/main/webapp/app/rest/types/UserGroup.js
+++ b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
@@ -50,7 +50,7 @@ angular.module('rest').factory('UserGroup', [function 
defineUserGroup() {
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 };
 



[11/13] guacamole-client git commit: GUACAMOLE-220: Select from multiple datasources deterministically.

2018-08-14 Thread vnick
GUACAMOLE-220: Select from multiple datasources deterministically.

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

Branch: refs/heads/master
Commit: 6aaef7685f8b455bc4b7854d8aef8617a3d7b4f1
Parents: 8ad3f25
Author: Michael Jumper 
Authored: Wed Aug 8 22:56:07 2018 -0700
Committer: Michael Jumper 
Committed: Thu Aug 9 10:46:06 2018 -0700

--
 .../src/main/webapp/app/manage/directives/dataSourceTabs.js | 5 -
 .../webapp/app/settings/directives/guacSettingsUserGroups.js| 4 +++-
 .../main/webapp/app/settings/directives/guacSettingsUsers.js| 4 +++-
 3 files changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6aaef768/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
--
diff --git a/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js 
b/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
index cf7068f..627197b 100644
--- a/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
+++ b/guacamole/src/main/webapp/app/manage/directives/dataSourceTabs.js
@@ -76,9 +76,12 @@ angular.module('manage').directive('dataSourceTabs', 
['$injector',
 $scope.$watch('permissions', function permissionsChanged(permissions) {
 
 $scope.pages = [];
-angular.forEach(permissions, function 
addDataSourcePage(managementPermissions, dataSource) {
+
+var dataSources = _.keys($scope.permissions).sort();
+angular.forEach(dataSources, function 
addDataSourcePage(dataSource) {
 
 // Determine whether data source contains this object
+var managementPermissions = permissions[dataSource];
 var exists = !!managementPermissions.identifier;
 
 // Data source is not relevant if the associated object does 
not

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6aaef768/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
--
diff --git 
a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js 
b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
index 5d45bc1..a8f2dd3 100644
--- 
a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
+++ 
b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUserGroups.js
@@ -119,9 +119,11 @@ 
angular.module('settings').directive('guacSettingsUserGroups', ['$injector',
 return null;
 
 // For each data source
-for (var dataSource in permissions) {
+var dataSources = _.keys(permissions).sort();
+for (var i = 0; i < dataSources.length; i++) {
 
 // Retrieve corresponding permission set
+var dataSource = dataSources[i];
 var permissionSet = permissions[dataSource];
 
 // Can create user groups if adminstrator or have explicit 
permission

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6aaef768/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
--
diff --git 
a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js 
b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
index 870a862..4adf04e 100644
--- a/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
+++ b/guacamole/src/main/webapp/app/settings/directives/guacSettingsUsers.js
@@ -150,9 +150,11 @@ angular.module('settings').directive('guacSettingsUsers', 
[function guacSettings
 return null;
 
 // For each data source
-for (var dataSource in $scope.permissions) {
+var dataSources = _.keys($scope.permissions).sort();
+for (var i = 0; i < dataSources.length; i++) {
 
 // Retrieve corresponding permission set
+var dataSource = dataSources[i];
 var permissionSet = $scope.permissions[dataSource];
 
 // Can create users if adminstrator or have explicit 
permission



[06/13] guacamole-client git commit: GUACAMOLE-220: Add missing getUserGroupAttributes() to JavaScript schemaService.

2018-08-14 Thread vnick
GUACAMOLE-220: Add missing getUserGroupAttributes() to JavaScript schemaService.


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

Branch: refs/heads/master
Commit: 615f5c6bab28f78884cf42fb29c76ad44822a33d
Parents: 55bcf25
Author: Michael Jumper 
Authored: Thu Apr 19 23:21:17 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../webapp/app/rest/services/schemaService.js   | 34 
 1 file changed, 34 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/615f5c6b/guacamole/src/main/webapp/app/rest/services/schemaService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/schemaService.js 
b/guacamole/src/main/webapp/app/rest/services/schemaService.js
index cc871d8..61c8639 100644
--- a/guacamole/src/main/webapp/app/rest/services/schemaService.js
+++ b/guacamole/src/main/webapp/app/rest/services/schemaService.js
@@ -66,6 +66,40 @@ angular.module('rest').factory('schemaService', ['$injector',
 
 /**
  * Makes a request to the REST API to get the list of available attributes
+ * for user group objects, returning a promise that provides an array of
+ * @link{Form} objects if successful. Each element of the array describes
+ * a logical grouping of possible attributes.
+ *
+ * @param {String} dataSource
+ * The unique identifier of the data source containing the user groups
+ * whose available attributes are to be retrieved. This identifier
+ * corresponds to an AuthenticationProvider within the Guacamole web
+ * application.
+ *
+ * @returns {Promise.}
+ * A promise which will resolve with an array of @link{Form}
+ * objects, where each @link{Form} describes a logical grouping of
+ * possible attributes.
+ */
+service.getUserGroupAttributes = function 
getUserGroupAttributes(dataSource) {
+
+// Build HTTP parameters set
+var httpParameters = {
+token : authenticationService.getCurrentToken()
+};
+
+// Retrieve available user group attributes
+return requestService({
+cache   : cacheService.schema,
+method  : 'GET',
+url : 'api/session/data/' + encodeURIComponent(dataSource) + 
'/schema/userGroupAttributes',
+params  : httpParameters
+});
+
+};
+
+/**
+ * Makes a request to the REST API to get the list of available attributes
  * for connection objects, returning a promise that provides an array of
  * @link{Form} objects if successful. Each element of the array describes
  * a logical grouping of possible attributes.



[10/13] guacamole-client git commit: GUACAMOLE-220: Add management tab and editor for user groups.

2018-08-14 Thread vnick
GUACAMOLE-220: Add management tab and editor for user groups.


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

Branch: refs/heads/master
Commit: 8ad3f2537119d61becad38558dc1365742ba7444
Parents: de80957
Author: Michael Jumper 
Authored: Thu Apr 19 23:51:25 2018 -0700
Committer: Michael Jumper 
Committed: Thu Aug 9 10:46:06 2018 -0700

--
 .../webapp/app/index/config/indexRouteConfig.js |   9 +
 .../src/main/webapp/app/index/styles/lists.css  |   4 +
 .../src/main/webapp/app/index/styles/ui.css |   8 +
 .../controllers/manageUserGroupController.js| 538 +++
 .../manage/directives/systemPermissionEditor.js |   4 +
 .../app/manage/styles/manage-user-group.css |  71 +++
 .../app/manage/templates/manageUserGroup.html   | 101 
 .../app/manage/types/ManageableUserGroup.js |  53 ++
 .../app/navigation/services/userPageService.js  |  27 +
 .../settings/controllers/settingsController.js  |   4 +-
 .../directives/guacSettingsUserGroups.js| 270 ++
 .../main/webapp/app/settings/styles/buttons.css |   6 +
 .../app/settings/styles/user-group-list.css |  36 ++
 .../webapp/app/settings/templates/settings.html |   1 +
 .../settings/templates/settingsUserGroups.html  |  48 ++
 .../images/action-icons/guac-user-group-add.png | Bin 0 -> 1222 bytes
 .../images/user-icons/guac-user-group.png   | Bin 0 -> 1428 bytes
 guacamole/src/main/webapp/translations/en.json  |  67 ++-
 18 files changed, 1244 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8ad3f253/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
--
diff --git a/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js 
b/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
index 47bc48e..5a8c3fb 100644
--- a/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
+++ b/guacamole/src/main/webapp/app/index/config/indexRouteConfig.js
@@ -171,6 +171,15 @@ angular.module('index').config(['$routeProvider', 
'$locationProvider',
 resolve   : { updateCurrentToken: updateCurrentToken }
 })
 
+// User group editor
+.when('/manage/:dataSource/userGroups/:id?', {
+title : 'APP.NAME',
+bodyClassName : 'manage',
+templateUrl   : 'app/manage/templates/manageUserGroup.html',
+controller: 'manageUserGroupController',
+resolve   : { updateCurrentToken: updateCurrentToken }
+})
+
 // Client view
 .when('/client/:id/:params?', {
 bodyClassName : 'client',

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8ad3f253/guacamole/src/main/webapp/app/index/styles/lists.css
--
diff --git a/guacamole/src/main/webapp/app/index/styles/lists.css 
b/guacamole/src/main/webapp/app/index/styles/lists.css
index 0c761ae..80df491 100644
--- a/guacamole/src/main/webapp/app/index/styles/lists.css
+++ b/guacamole/src/main/webapp/app/index/styles/lists.css
@@ -18,12 +18,14 @@
  */
 
 .user,
+.user-group,
 .connection-group,
 .connection {
 cursor: pointer;
 }
 
 .user a,
+.user-group a,
 .connection a,
 .connection-group a {
 text-decoration:none;
@@ -31,6 +33,7 @@
 }
 
 .user a:hover,
+.user-group a:hover,
 .connection a:hover,
 .connection-group a:hover {
 text-decoration:none;
@@ -38,6 +41,7 @@
 }
 
 .user a:visited,
+.user-group a:visited,
 .connection a:visited,
 .connection-group a:visited {
 text-decoration:none;

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8ad3f253/guacamole/src/main/webapp/app/index/styles/ui.css
--
diff --git a/guacamole/src/main/webapp/app/index/styles/ui.css 
b/guacamole/src/main/webapp/app/index/styles/ui.css
index 434f443..58406eb 100644
--- a/guacamole/src/main/webapp/app/index/styles/ui.css
+++ b/guacamole/src/main/webapp/app/index/styles/ui.css
@@ -156,6 +156,14 @@ div.section {
 background-image: url('images/action-icons/guac-user-add.png');
 }
 
+.icon.user-group {
+background-image: url('images/user-icons/guac-user-group.png');
+}
+
+.icon.user-group.add {
+background-image: url('images/action-icons/guac-user-group-add.png');
+}
+
 .icon.connection {
 background-image: url('images/protocol-icons/guac-plug.png');
 }


[12/13] guacamole-client git commit: GUACAMOLE-220: Merge add user interface for managing user groups and membership.

2018-08-14 Thread vnick
GUACAMOLE-220: Merge add user interface for managing user groups and membership.


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

Branch: refs/heads/master
Commit: 402ddb577f9c7ab204d04640e12d983ecd3f311d
Parents: c36d333 7917f46
Author: Nick Couchman 
Authored: Tue Aug 14 19:33:02 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 14 19:33:02 2018 -0400

--
 guacamole/pom.xml   |   4 +-
 guacamole/src/licenses/LICENSE  |  60 ++-
 .../bundled/jquery-2.1.3/MIT-LICENSE.txt|  21 -
 .../licenses/bundled/jquery-3.3.1/LICENSE.txt   |  36 ++
 .../licenses/bundled/lodash-2.4.1/LICENSE.txt   |  22 -
 .../src/licenses/bundled/lodash-4.17.10/LICENSE |  47 ++
 .../webapp/app/index/config/indexRouteConfig.js |   9 +
 .../src/main/webapp/app/index/styles/lists.css  |   4 +
 .../src/main/webapp/app/index/styles/ui.css |   8 +
 .../manage/controllers/manageUserController.js  |  69 ++-
 .../controllers/manageUserGroupController.js| 538 +++
 .../app/manage/directives/dataSourceTabs.js |   5 +-
 .../manage/directives/identifierSetEditor.js| 300 +++
 .../manage/directives/systemPermissionEditor.js |   4 +
 .../app/manage/styles/manage-user-group.css |  71 +++
 .../app/manage/styles/related-objects.css   |  82 +++
 .../manage/templates/identifierSetEditor.html   |  47 ++
 .../webapp/app/manage/templates/manageUser.html |  11 +
 .../app/manage/templates/manageUserGroup.html   | 101 
 .../app/manage/types/ManageableUserGroup.js |  53 ++
 .../app/navigation/services/userPageService.js  |  27 +
 .../webapp/app/rest/services/cacheService.js|   3 +-
 .../app/rest/services/membershipService.js  | 385 +
 .../app/rest/services/permissionService.js  |  91 ++--
 .../webapp/app/rest/services/schemaService.js   |  34 ++
 .../app/rest/services/userGroupService.js   | 223 
 .../main/webapp/app/rest/types/Connection.js|   2 +-
 .../webapp/app/rest/types/ConnectionGroup.js|   2 +-
 .../webapp/app/rest/types/PermissionFlagSet.js  |  23 +-
 .../main/webapp/app/rest/types/PermissionSet.js |  82 ++-
 .../webapp/app/rest/types/RelatedObjectPatch.js |  85 +++
 .../webapp/app/rest/types/SharingProfile.js |   2 +-
 .../src/main/webapp/app/rest/types/User.js  |   2 +-
 .../src/main/webapp/app/rest/types/UserGroup.js |  59 ++
 .../settings/controllers/settingsController.js  |   4 +-
 .../directives/guacSettingsUserGroups.js| 272 ++
 .../settings/directives/guacSettingsUsers.js|   4 +-
 .../main/webapp/app/settings/styles/buttons.css |   6 +
 .../app/settings/styles/user-group-list.css |  36 ++
 .../webapp/app/settings/templates/settings.html |   1 +
 .../settings/templates/settingsUserGroups.html  |  48 ++
 .../images/action-icons/guac-user-group-add.png | Bin 0 -> 1222 bytes
 .../src/main/webapp/images/arrows/right.png | Bin 0 -> 264 bytes
 .../images/user-icons/guac-user-group.png   | Bin 0 -> 1428 bytes
 guacamole/src/main/webapp/images/x-red.png  | Bin 0 -> 583 bytes
 guacamole/src/main/webapp/index.html|   4 +-
 guacamole/src/main/webapp/translations/en.json  |  73 ++-
 47 files changed, 2854 insertions(+), 106 deletions(-)
--




[03/13] guacamole-client git commit: GUACAMOLE-220: Add JavaScript service for retrieving/manipulating user groups.

2018-08-14 Thread vnick
GUACAMOLE-220: Add JavaScript service for retrieving/manipulating user groups.


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

Branch: refs/heads/master
Commit: 9f01fcb1558b11b52c78bcddee2ea601ab4b102c
Parents: c36d333
Author: Michael Jumper 
Authored: Thu Apr 19 14:38:24 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../webapp/app/rest/services/cacheService.js|   3 +-
 .../app/rest/services/membershipService.js  | 385 +++
 .../app/rest/services/userGroupService.js   | 223 +++
 .../webapp/app/rest/types/RelatedObjectPatch.js |  85 
 .../src/main/webapp/app/rest/types/UserGroup.js |  59 +++
 5 files changed, 754 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9f01fcb1/guacamole/src/main/webapp/app/rest/services/cacheService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/cacheService.js 
b/guacamole/src/main/webapp/app/rest/services/cacheService.js
index 55b7fc1..9a32004 100644
--- a/guacamole/src/main/webapp/app/rest/services/cacheService.js
+++ b/guacamole/src/main/webapp/app/rest/services/cacheService.js
@@ -60,7 +60,8 @@ angular.module('rest').factory('cacheService', ['$injector',
 service.schema = $cacheFactory('API-SCHEMA');
 
 /**
- * Shared cache used by both userService and permissionService.
+ * Shared cache used by userService, userGroupService, permissionService,
+ * and membershipService.
  *
  * @type $cacheFactory.Cache
  */

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9f01fcb1/guacamole/src/main/webapp/app/rest/services/membershipService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/membershipService.js 
b/guacamole/src/main/webapp/app/rest/services/membershipService.js
new file mode 100644
index 000..58181c8
--- /dev/null
+++ b/guacamole/src/main/webapp/app/rest/services/membershipService.js
@@ -0,0 +1,385 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Service for operating on user group memberships via the REST API.
+ */
+angular.module('rest').factory('membershipService', ['$injector',
+function membershipService($injector) {
+
+// Required services
+var requestService= $injector.get('requestService');
+var authenticationService = $injector.get('authenticationService');
+var cacheService  = $injector.get('cacheService');
+
+// Required types
+var RelatedObjectPatch = $injector.get('RelatedObjectPatch');
+
+var service = {};
+
+/**
+ * Creates a new array of patches which represents the given changes to an
+ * arbitrary set of objects sharing some common relation.
+ *
+ * @param {String[]} [identifiersToAdd]
+ * The identifiers of all objects which should be added to the
+ * relation, if any.
+ *
+ * @param {String[]} [identifiersToRemove]
+ * The identifiers of all objects which should be removed from the
+ * relation, if any.
+ *
+ * @returns {RelatedObjectPatch[]}
+ * A new array of patches which represents the given changes.
+ */
+var getRelatedObjectPatch = function 
getRelatedObjectPatch(identifiersToAdd, identifiersToRemove) {
+
+var patch = [];
+
+angular.forEach(identifiersToAdd, function addIdentifier(identifier) {
+patch.push(new RelatedObjectPatch({
+op: RelatedObjectPatch.Operation.ADD,
+value : identifier
+}));
+});
+
+angular.forEach(identifiersToRemove, function 
removeIdentifier(identifier) {
+patch.push(new RelatedObjectPatch({
+ 

[04/13] guacamole-client git commit: GUACAMOLE-220: Implement generic editor directive for manipulating sets of identifiers.

2018-08-14 Thread vnick
GUACAMOLE-220: Implement generic editor directive for manipulating sets of 
identifiers.


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

Branch: refs/heads/master
Commit: 229b0dee4882352e7583c4f5872bee92158da712
Parents: 1cf16d1
Author: Michael Jumper 
Authored: Wed Jul 25 02:34:27 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../manage/directives/identifierSetEditor.js| 267 +++
 .../app/manage/styles/related-objects.css   |  82 ++
 .../manage/templates/identifierSetEditor.html   |  46 
 .../src/main/webapp/images/arrows/right.png | Bin 0 -> 264 bytes
 guacamole/src/main/webapp/images/x-red.png  | Bin 0 -> 583 bytes
 5 files changed, 395 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/229b0dee/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js 
b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
new file mode 100644
index 000..82f1109
--- /dev/null
+++ b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * A directive for manipulating a set of objects sharing some common relation
+ * and represented by an array of their identifiers. The specific objects
+ * added or removed are tracked within a separate pair of arrays of
+ * identifiers.
+ */
+angular.module('manage').directive('identifierSetEditor', ['$injector',
+function identifierSetEditor($injector) {
+
+var directive = {
+
+// Element only
+restrict: 'E',
+replace: true,
+
+scope: {
+
+/**
+ * The translation key of the text which should be displayed within
+ * the main header of the identifier set editor.
+ *
+ * @type String
+ */
+header : '@',
+
+/**
+ * The translation key of the text which should be displayed if no
+ * identifiers are currently present within the set.
+ *
+ * @type String
+ */
+emptyPlaceholder : '@',
+
+/**
+ * The translation key of the text which should be displayed if no
+ * identifiers are available to be added within the set.
+ *
+ * @type String
+ */
+unavailablePlaceholder : '@',
+
+/**
+ * All identifiers which are available to be added to or removed
+ * from the identifier set being edited.
+ *
+ * @type String[]
+ */
+identifiersAvailable : '=',
+
+/**
+ * The current state of the identifier set being manipulated. This
+ * array will be modified as changes are made through this
+ * identifier set editor.
+ *
+ * @type String[]
+ */
+identifiers : '=',
+
+/**
+ * The set of identifiers that have been added, relative to the
+ * initial state of the identifier set being manipulated.
+ *
+ * @type String[]
+ */
+identifiersAdded : '=',
+
+/**
+ * The set of identifiers that have been removed, relative to the
+ * initial state of the identifier set being manipulated.
+ *
+ * @type String[]
+ */
+identifiersRemoved : '='
+
+},
+
+templateUrl: 'app/manage/templates/identifierSetEditor.html'
+
+};
+
+directive.controller = 

[05/13] guacamole-client git commit: GUACAMOLE-220: Upgrade to latest versions of jQuery and Lodash.

2018-08-14 Thread vnick
GUACAMOLE-220: Upgrade to latest versions of jQuery and Lodash.

The version of Lodash previously included with Guacamole lacks the
sortedIndexOf() function, which is needed by the identity set editor
directive for manipulating sorted arrays of identifiers.

If upgrading Lodash, may as well upgrade jQuery while we're at it. The
version previously included within Guacamole is no longer maintained.


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

Branch: refs/heads/master
Commit: 1cf16d1dc6f02e608eb860d627c423dc6be958da
Parents: 615f5c6
Author: Michael Jumper 
Authored: Sat Jul 21 19:41:47 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 guacamole/pom.xml   |  4 +-
 guacamole/src/licenses/LICENSE  | 60 
 .../bundled/jquery-2.1.3/MIT-LICENSE.txt| 21 ---
 .../licenses/bundled/jquery-3.3.1/LICENSE.txt   | 36 
 .../licenses/bundled/lodash-2.4.1/LICENSE.txt   | 22 ---
 .../src/licenses/bundled/lodash-4.17.10/LICENSE | 47 +++
 guacamole/src/main/webapp/index.html|  4 +-
 7 files changed, 137 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/1cf16d1d/guacamole/pom.xml
--
diff --git a/guacamole/pom.xml b/guacamole/pom.xml
index dc4f082..0899e78 100644
--- a/guacamole/pom.xml
+++ b/guacamole/pom.xml
@@ -308,7 +308,7 @@
 
 org.webjars.bower
 lodash
-2.4.1
+4.17.10
 runtime
 
 
@@ -316,7 +316,7 @@
 
 org.webjars.bower
 jquery
-2.1.3
+3.3.1
 runtime
 
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/1cf16d1d/guacamole/src/licenses/LICENSE
--
diff --git a/guacamole/src/licenses/LICENSE b/guacamole/src/licenses/LICENSE
index 4474707..51f5b21 100644
--- a/guacamole/src/licenses/LICENSE
+++ b/guacamole/src/licenses/LICENSE
@@ -486,13 +486,21 @@ Jettison (https://github.com/jettison-json/jettison)
 jQuery (http://jquery.com/)
 ---
 
-Version: 2.1.3
-From: 'jQuery Foundation' (http://jquery.com/)
+Version: 3.3.1
+From: 'JS Foundation' (https://js.foundation/)
 License(s):
-MIT (bundled/jquery-2.1.3/MIT-LICENSE.txt)
+MIT (bundled/jquery-3.3.1/LICENSE.txt)
 
-Copyright 2014 jQuery Foundation and other contributors
-http://jquery.com/
+Copyright JS Foundation and other contributors, https://js.foundation/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/jquery
+
+The following license applies to all parts of this software except as
+documented below:
+
+
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
@@ -513,6 +521,13 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
IN AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+
+
+All files located in the node_modules and external directories are
+externally maintained libraries used by this software which have their
+own licenses; we recommend you read them, as their terms may differ from
+the terms above.
+
 
 JSR-250 Reference Implementation
 (https://jcp.org/aboutJava/communityprocess/final/jsr250/index.html)
@@ -536,15 +551,25 @@ JSR-330 / Dependency Injection for Java 
(http://code.google.com/p/atinject/)
 Lodash (https://lodash.com/)
 
 
-Version: 2.4.1
-From: 'The Dojo Foundation' (http://dojofoundation.org/)
+Version: 4.17.10
+From: 'JS Foundation' (https://js.foundation/)
 License(s):
-MIT (bundled/lodash-2.4.1/LICENSE.txt)
+MIT (bundled/lodash-4.17.10/LICENSE)
+
+Copyright JS Foundation and other contributors 
 
-Copyright 2012-2013 The Dojo Foundation 
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
 DocumentCloud and Investigative Reporters & Editors 
 
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available 

[01/13] guacamole-client git commit: GUACAMOLE-220: Hide identifier set editor if there are no identifiers to edit.

2018-08-14 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/master a34bbcf63 -> 7d822df5a


GUACAMOLE-220: Hide identifier set editor if there are no identifiers to edit.

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

Branch: refs/heads/master
Commit: 0059121716c869e34a8089ada3069ad67ffb6ee7
Parents: 229b0de
Author: Michael Jumper 
Authored: Tue Aug 7 12:25:55 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../app/manage/directives/identifierSetEditor.js  | 14 ++
 .../app/manage/templates/identifierSetEditor.html |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/00591217/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js 
b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
index 82f1109..4240901 100644
--- a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
+++ b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
@@ -260,6 +260,20 @@ angular.module('manage').directive('identifierSetEditor', 
['$injector',
 $scope.expanded = false;
 };
 
+/**
+ * Returns whether there are absolutely no identifiers that can be
+ * managed using this editor. If true, the editor is effectively
+ * useless, as there is nothing whatsoever to display.
+ *
+ * @returns {Boolean}
+ * true if there are no identifiers that can be managed using this
+ * editor, false otherwise.
+ */
+$scope.isEmpty = function isEmpty() {
+return _.isEmpty($scope.identifiers)
+&& _.isEmpty($scope.identifiersAvailable);
+};
+
 }];
 
 return directive;

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/00591217/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
--
diff --git 
a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html 
b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
index 838decf..7f66088 100644
--- a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
+++ b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
@@ -1,4 +1,4 @@
-
+
 
 {{ header | translate }}
 



[08/13] guacamole-client git commit: GUACAMOLE-220: Add management interface for user parent groups.

2018-08-14 Thread vnick
GUACAMOLE-220: Add management interface for user parent groups.


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

Branch: refs/heads/master
Commit: de8095740435de7fcfddf263304aa8be2eb553dd
Parents: ca1db78
Author: Michael Jumper 
Authored: Tue Aug 7 12:15:46 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 21:50:26 2018 -0700

--
 .../manage/controllers/manageUserController.js  | 69 ++--
 .../webapp/app/manage/templates/manageUser.html | 11 
 guacamole/src/main/webapp/translations/en.json  |  6 +-
 3 files changed, 80 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/de809574/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js 
b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
index e4a91db..7d8397f 100644
--- a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
+++ b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
@@ -36,9 +36,11 @@ angular.module('manage').controller('manageUserController', 
['$scope', '$injecto
 var $q   = $injector.get('$q');
 var authenticationService= $injector.get('authenticationService');
 var dataSourceService= $injector.get('dataSourceService');
+var membershipService= $injector.get('membershipService');
 var permissionService= $injector.get('permissionService');
 var requestService   = $injector.get('requestService');
 var schemaService= $injector.get('schemaService');
+var userGroupService = $injector.get('userGroupService');
 var userService  = $injector.get('userService');
 
 /**
@@ -134,6 +136,46 @@ 
angular.module('manage').controller('manageUserController', ['$scope', '$injecto
 $scope.permissionsRemoved = new PermissionSet();
 
 /**
+ * The identifiers of all user groups which can be manipulated (all groups
+ * for which the user accessing this interface has UPDATE permission),
+ * either through adding the current user as a member or removing the
+ * current user from that group. If this information has not yet been
+ * retrieved, this will be null.
+ *
+ * @type String[]
+ */
+$scope.availableGroups = null;
+
+/**
+ * The identifiers of all user groups of which the user is a member,
+ * taking into account any user groups which will be added/removed when
+ * saved. If this information has not yet been retrieved, this will be
+ * null.
+ *
+ * @type String[]
+ */
+$scope.parentGroups = null;
+
+/**
+ * The set of identifiers of all parent user groups to which the user will
+ * be added when saved. Parent groups will only be present in this set if
+ * they are manually added, and not later manually removed before saving.
+ *
+ * @type String[]
+ */
+$scope.parentGroupsAdded = [];
+
+/**
+ * The set of identifiers of all parent user groups from which the user
+ * will be removed when saved. Parent groups will only be present in this
+ * set if they are manually removed, and not later manually added before
+ * saving.
+ *
+ * @type String[]
+ */
+$scope.parentGroupsRemoved = [];
+
+/**
  * For each applicable data source, the management-related actions that the
  * current user may perform on the user account currently being created
  * or modified, as a map of data source identifier to the
@@ -166,6 +208,8 @@ angular.module('manage').controller('manageUserController', 
['$scope', '$injecto
 return $scope.users !== null
 && $scope.permissionFlags   !== null
 && $scope.managementPermissions !== null
+&& $scope.availableGroups   !== null
+&& $scope.parentGroups  !== null
 && $scope.attributes!== null;
 
 };
@@ -204,12 +248,14 @@ 
angular.module('manage').controller('manageUserController', ['$scope', '$injecto
 var loadExistingUser = function loadExistingUser(dataSource, username) {
 return $q.all({
 users : dataSourceService.apply(userService.getUser, dataSources, 
username),
-permissions : permissionService.getPermissions(dataSource, 
username)
+permissions : permissionService.getPermissions(dataSource, 
username),
+   

[02/13] guacamole-client git commit: GUACAMOLE-220: Allow manipulation and retrieval of user group permissions via JavaScript.

2018-08-14 Thread vnick
GUACAMOLE-220: Allow manipulation and retrieval of user group permissions via 
JavaScript.


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

Branch: refs/heads/master
Commit: 55bcf25a1c53f85ba2383fc83b46e2bc2ccd05af
Parents: 9f01fcb
Author: Michael Jumper 
Authored: Thu Apr 19 14:39:04 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../app/rest/services/permissionService.js  | 91 +---
 .../webapp/app/rest/types/PermissionFlagSet.js  | 23 -
 .../main/webapp/app/rest/types/PermissionSet.js | 82 +-
 3 files changed, 163 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/55bcf25a/guacamole/src/main/webapp/app/rest/services/permissionService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/permissionService.js 
b/guacamole/src/main/webapp/app/rest/services/permissionService.js
index 6d3dfdf..21c5a02 100644
--- a/guacamole/src/main/webapp/app/rest/services/permissionService.js
+++ b/guacamole/src/main/webapp/app/rest/services/permissionService.js
@@ -45,6 +45,11 @@ angular.module('rest').factory('permissionService', 
['$injector',
  * within that data source (and thus cannot be found beneath
  * "api/session/data/{dataSource}/users")
  *
+ * NOTE: Unlike getPermissionsResourceURL(),
+ * getEffectivePermissionsResourceURL() CANNOT be applied to user groups.
+ * Only users have retrievable effective permissions as far as the REST API
+ * is concerned.
+ *
  * @param {String} dataSource
  * The unique identifier of the data source containing the user whose
  * permissions should be retrieved. This identifier corresponds to an
@@ -82,6 +87,10 @@ angular.module('rest').factory('permissionService', 
['$injector',
  * from the permissions returned via getPermissions() in that permissions
  * which are not directly granted to the user are included.
  *
+ * NOTE: Unlike getPermissions(), getEffectivePermissions() CANNOT be
+ * applied to user groups. Only users have retrievable effective
+ * permissions as far as the REST API is concerned.
+ *
  * @param {String} dataSource
  * The unique identifier of the data source containing the user whose
  * permissions should be retrieved. This identifier corresponds to an
@@ -113,10 +122,10 @@ angular.module('rest').factory('permissionService', 
['$injector',
 
 /**
  * Returns the URL for the REST resource most appropriate for accessing
- * the permissions of the user having the given identifier. The permissions
- * retrieved differ from effective permissions (those returned by
- * getEffectivePermissions()) in that only permissions which are directly
- * granted to the user are included.
+ * the permissions of the user or group having the given identifier. The
+ * permissions retrieved differ from effective permissions (those returned
+ * by getEffectivePermissions()) in that only permissions which are 
directly
+ * granted to the user or group are included.
  * 
  * It is important to note that a particular data source can authenticate
  * and provide permissions for a user, even if that user does not exist
@@ -129,18 +138,27 @@ angular.module('rest').factory('permissionService', 
['$injector',
  * AuthenticationProvider within the Guacamole web application.
  *
  * @param {String} identifier
- * The identifier of the user for which the URL of the proper REST
- * resource should be derived.
+ * The identifier of the user or group for which the URL of the proper
+ * REST resource should be derived.
+ *
+ * @param {Boolean} [group]
+ * Whether the provided identifier refers to a user group. If false or
+ * omitted, the identifier given is assumed to refer to a user.
  *
  * @returns {String}
- * The URL for the REST resource representing the user having the given
- * identifier.
+ * The URL for the REST resource representing the user or group having
+ * the given identifier.
  */
-var getPermissionsResourceURL = function 
getPermissionsResourceURL(dataSource, identifier) {
+var getPermissionsResourceURL = function 
getPermissionsResourceURL(dataSource, identifier, group) {
 
 // Create base URL for data source
 var base = 'api/session/data/' + encodeURIComponent(dataSource);
 
+// Access group 

[07/13] guacamole-client git commit: GUACAMOLE-220: Do not display "X" for removing an identifier if the identifier cannot actually be edited.

2018-08-14 Thread vnick
GUACAMOLE-220: Do not display "X" for removing an identifier if the identifier 
cannot actually be edited.


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

Branch: refs/heads/master
Commit: ca1db7831bfc7b365f4bb84e2d0f9b082354162f
Parents: 0059121
Author: Michael Jumper 
Authored: Tue Aug 7 13:05:09 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 21:50:26 2018 -0700

--
 .../app/manage/directives/identifierSetEditor.js | 19 +++
 .../manage/templates/identifierSetEditor.html|  3 ++-
 2 files changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ca1db783/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js 
b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
index 4240901..d2936e7 100644
--- a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
+++ b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
@@ -118,6 +118,15 @@ angular.module('manage').directive('identifierSetEditor', 
['$injector',
 $scope.identifierFlags = {};
 
 /**
+ * Map of identifiers to boolean flags indicating whether that
+ * identifier is editable. If an identifier is not editable, it will be
+ * absent from this map.
+ *
+ * @type Object.
+ */
+$scope.isEditable = {};
+
+/**
  * Adds the given identifier to the given sorted array of identifiers,
  * preserving the sorted order of the array. If the identifier is
  * already present, no change is made to the array. The given array
@@ -194,6 +203,16 @@ angular.module('manage').directive('identifierSetEditor', 
['$injector',
 
 });
 
+// An identifier is editable iff it is available to be added or removed
+// from the identifier set being edited (iff it is within the
+// identifiersAvailable array)
+$scope.$watch('identifiersAvailable', function 
availableIdentifiersChanged(identifiers) {
+$scope.isEditable = {};
+angular.forEach(identifiers, function 
storeEditableIdentifier(identifier) {
+$scope.isEditable[identifier] = true;
+});
+});
+
 /**
  * Notifies the controller that a change has been made to the flag
  * denoting presence/absence of a particular identifier within the

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ca1db783/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
--
diff --git 
a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html 
b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
index 7f66088..72c235c 100644
--- a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
+++ b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
@@ -18,7 +18,8 @@
 
 
 {{ identifier }}
+ng-click="removeIdentifier(identifier)"
+ng-show="isEditable[identifier]"/>{{ identifier }}
 
 
 



[09/13] guacamole-client git commit: GUACAMOLE-220: Allow attributes to be specified via the template supplied to REST object constructors, for consistency's sake.

2018-08-14 Thread vnick
GUACAMOLE-220: Allow attributes to be specified via the template supplied to 
REST object constructors, for consistency's sake.

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

Branch: refs/heads/master
Commit: 7917f46b36fb04565c0e1d4119c0136c8f987fcd
Parents: 6aaef76
Author: Michael Jumper 
Authored: Thu Aug 9 10:43:46 2018 -0700
Committer: Michael Jumper 
Committed: Thu Aug 9 10:46:06 2018 -0700

--
 guacamole/src/main/webapp/app/rest/types/Connection.js  | 2 +-
 guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js | 2 +-
 guacamole/src/main/webapp/app/rest/types/SharingProfile.js  | 2 +-
 guacamole/src/main/webapp/app/rest/types/User.js| 2 +-
 guacamole/src/main/webapp/app/rest/types/UserGroup.js   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/Connection.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/Connection.js 
b/guacamole/src/main/webapp/app/rest/types/Connection.js
index 76ece9d..89da4e1 100644
--- a/guacamole/src/main/webapp/app/rest/types/Connection.js
+++ b/guacamole/src/main/webapp/app/rest/types/Connection.js
@@ -84,7 +84,7 @@ angular.module('rest').factory('Connection', [function 
defineConnection() {
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 /**
  * The count of currently active connections using this connection.

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js 
b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
index a40dba1..6da754c 100644
--- a/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
+++ b/guacamole/src/main/webapp/app/rest/types/ConnectionGroup.js
@@ -95,7 +95,7 @@ angular.module('rest').factory('ConnectionGroup', [function 
defineConnectionGrou
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 /**
  * The count of currently active connections using this connection

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/SharingProfile.js 
b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
index ea8287d..50f1307 100644
--- a/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
+++ b/guacamole/src/main/webapp/app/rest/types/SharingProfile.js
@@ -76,7 +76,7 @@ angular.module('rest').factory('SharingProfile', [function 
defineSharingProfile(
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 };
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/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 f796147..3ca138d 100644
--- a/guacamole/src/main/webapp/app/rest/types/User.js
+++ b/guacamole/src/main/webapp/app/rest/types/User.js
@@ -69,7 +69,7 @@ angular.module('rest').factory('User', [function defineUser() 
{
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 };
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7917f46b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/UserGroup.js 
b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
index 03b73e2..f4bf26c 100644
--- a/guacamole/src/main/webapp/app/rest/types/UserGroup.js
+++ b/guacamole/src/main/webapp/app/rest/types/UserGroup.js
@@ -50,7 +50,7 @@ angular.module('rest').factory('UserGroup', [function 
defineUserGroup() {
  *
  * @type Object.
  */
-this.attributes = {};
+this.attributes = template.attributes || {};
 
 };
 



[13/13] guacamole-client git commit: Merge 1.0.0 changes back to master.

2018-08-14 Thread vnick
Merge 1.0.0 changes back to master.


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

Branch: refs/heads/master
Commit: 7d822df5a3b040bf61d1055fe7bffaf1996c0983
Parents: a34bbcf 402ddb5
Author: Nick Couchman 
Authored: Tue Aug 14 19:38:16 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 14 19:38:16 2018 -0400

--
 guacamole/pom.xml   |   4 +-
 guacamole/src/licenses/LICENSE  |  60 ++-
 .../bundled/jquery-2.1.3/MIT-LICENSE.txt|  21 -
 .../licenses/bundled/jquery-3.3.1/LICENSE.txt   |  36 ++
 .../licenses/bundled/lodash-2.4.1/LICENSE.txt   |  22 -
 .../src/licenses/bundled/lodash-4.17.10/LICENSE |  47 ++
 .../webapp/app/index/config/indexRouteConfig.js |   9 +
 .../src/main/webapp/app/index/styles/lists.css  |   4 +
 .../src/main/webapp/app/index/styles/ui.css |   8 +
 .../manage/controllers/manageUserController.js  |  69 ++-
 .../controllers/manageUserGroupController.js| 538 +++
 .../app/manage/directives/dataSourceTabs.js |   5 +-
 .../manage/directives/identifierSetEditor.js| 300 +++
 .../manage/directives/systemPermissionEditor.js |   4 +
 .../app/manage/styles/manage-user-group.css |  71 +++
 .../app/manage/styles/related-objects.css   |  82 +++
 .../manage/templates/identifierSetEditor.html   |  47 ++
 .../webapp/app/manage/templates/manageUser.html |  11 +
 .../app/manage/templates/manageUserGroup.html   | 101 
 .../app/manage/types/ManageableUserGroup.js |  53 ++
 .../app/navigation/services/userPageService.js  |  27 +
 .../webapp/app/rest/services/cacheService.js|   3 +-
 .../app/rest/services/membershipService.js  | 385 +
 .../app/rest/services/permissionService.js  |  91 ++--
 .../webapp/app/rest/services/schemaService.js   |  34 ++
 .../app/rest/services/userGroupService.js   | 223 
 .../main/webapp/app/rest/types/Connection.js|   2 +-
 .../webapp/app/rest/types/ConnectionGroup.js|   2 +-
 .../webapp/app/rest/types/PermissionFlagSet.js  |  23 +-
 .../main/webapp/app/rest/types/PermissionSet.js |  82 ++-
 .../webapp/app/rest/types/RelatedObjectPatch.js |  85 +++
 .../webapp/app/rest/types/SharingProfile.js |   2 +-
 .../src/main/webapp/app/rest/types/User.js  |   2 +-
 .../src/main/webapp/app/rest/types/UserGroup.js |  59 ++
 .../settings/controllers/settingsController.js  |   4 +-
 .../directives/guacSettingsUserGroups.js| 272 ++
 .../settings/directives/guacSettingsUsers.js|   4 +-
 .../main/webapp/app/settings/styles/buttons.css |   6 +
 .../app/settings/styles/user-group-list.css |  36 ++
 .../webapp/app/settings/templates/settings.html |   1 +
 .../settings/templates/settingsUserGroups.html  |  48 ++
 .../images/action-icons/guac-user-group-add.png | Bin 0 -> 1222 bytes
 .../src/main/webapp/images/arrows/right.png | Bin 0 -> 264 bytes
 .../images/user-icons/guac-user-group.png   | Bin 0 -> 1428 bytes
 guacamole/src/main/webapp/images/x-red.png  | Bin 0 -> 583 bytes
 guacamole/src/main/webapp/index.html|   4 +-
 guacamole/src/main/webapp/translations/en.json  |  73 ++-
 47 files changed, 2854 insertions(+), 106 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7d822df5/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
--

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7d822df5/guacamole/src/main/webapp/app/manage/directives/systemPermissionEditor.js
--

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/7d822df5/guacamole/src/main/webapp/app/navigation/services/userPageService.js
--
diff --cc guacamole/src/main/webapp/app/navigation/services/userPageService.js
index a9f849b,f5bc308..2af426e
--- a/guacamole/src/main/webapp/app/navigation/services/userPageService.js
+++ b/guacamole/src/main/webapp/app/navigation/services/userPageService.js
@@@ -194,8 -192,10 +194,9 @@@ angular.module('navigation').factory('u
  var pages = [];
  
  var canManageUsers = [];
+ var canManageUserGroups = [];
  var canManageConnections = [];
  var canViewConnectionRecords = [];
 -var canManageSessions = [];
  
  // Inspect the contents of each provided permission set
  angular.forEach(authenticationService.getAvailableDataSources(), 
function inspectPermissions(dataSource) {


[12/12] guacamole-client git commit: GUACAMOLE-220: Merge add user interface for managing user groups and membership.

2018-08-14 Thread vnick
GUACAMOLE-220: Merge add user interface for managing user groups and membership.


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

Branch: refs/heads/staging/1.0.0
Commit: 402ddb577f9c7ab204d04640e12d983ecd3f311d
Parents: c36d333 7917f46
Author: Nick Couchman 
Authored: Tue Aug 14 19:33:02 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 14 19:33:02 2018 -0400

--
 guacamole/pom.xml   |   4 +-
 guacamole/src/licenses/LICENSE  |  60 ++-
 .../bundled/jquery-2.1.3/MIT-LICENSE.txt|  21 -
 .../licenses/bundled/jquery-3.3.1/LICENSE.txt   |  36 ++
 .../licenses/bundled/lodash-2.4.1/LICENSE.txt   |  22 -
 .../src/licenses/bundled/lodash-4.17.10/LICENSE |  47 ++
 .../webapp/app/index/config/indexRouteConfig.js |   9 +
 .../src/main/webapp/app/index/styles/lists.css  |   4 +
 .../src/main/webapp/app/index/styles/ui.css |   8 +
 .../manage/controllers/manageUserController.js  |  69 ++-
 .../controllers/manageUserGroupController.js| 538 +++
 .../app/manage/directives/dataSourceTabs.js |   5 +-
 .../manage/directives/identifierSetEditor.js| 300 +++
 .../manage/directives/systemPermissionEditor.js |   4 +
 .../app/manage/styles/manage-user-group.css |  71 +++
 .../app/manage/styles/related-objects.css   |  82 +++
 .../manage/templates/identifierSetEditor.html   |  47 ++
 .../webapp/app/manage/templates/manageUser.html |  11 +
 .../app/manage/templates/manageUserGroup.html   | 101 
 .../app/manage/types/ManageableUserGroup.js |  53 ++
 .../app/navigation/services/userPageService.js  |  27 +
 .../webapp/app/rest/services/cacheService.js|   3 +-
 .../app/rest/services/membershipService.js  | 385 +
 .../app/rest/services/permissionService.js  |  91 ++--
 .../webapp/app/rest/services/schemaService.js   |  34 ++
 .../app/rest/services/userGroupService.js   | 223 
 .../main/webapp/app/rest/types/Connection.js|   2 +-
 .../webapp/app/rest/types/ConnectionGroup.js|   2 +-
 .../webapp/app/rest/types/PermissionFlagSet.js  |  23 +-
 .../main/webapp/app/rest/types/PermissionSet.js |  82 ++-
 .../webapp/app/rest/types/RelatedObjectPatch.js |  85 +++
 .../webapp/app/rest/types/SharingProfile.js |   2 +-
 .../src/main/webapp/app/rest/types/User.js  |   2 +-
 .../src/main/webapp/app/rest/types/UserGroup.js |  59 ++
 .../settings/controllers/settingsController.js  |   4 +-
 .../directives/guacSettingsUserGroups.js| 272 ++
 .../settings/directives/guacSettingsUsers.js|   4 +-
 .../main/webapp/app/settings/styles/buttons.css |   6 +
 .../app/settings/styles/user-group-list.css |  36 ++
 .../webapp/app/settings/templates/settings.html |   1 +
 .../settings/templates/settingsUserGroups.html  |  48 ++
 .../images/action-icons/guac-user-group-add.png | Bin 0 -> 1222 bytes
 .../src/main/webapp/images/arrows/right.png | Bin 0 -> 264 bytes
 .../images/user-icons/guac-user-group.png   | Bin 0 -> 1428 bytes
 guacamole/src/main/webapp/images/x-red.png  | Bin 0 -> 583 bytes
 guacamole/src/main/webapp/index.html|   4 +-
 guacamole/src/main/webapp/translations/en.json  |  73 ++-
 47 files changed, 2854 insertions(+), 106 deletions(-)
--




[07/12] guacamole-client git commit: GUACAMOLE-220: Do not display "X" for removing an identifier if the identifier cannot actually be edited.

2018-08-14 Thread vnick
GUACAMOLE-220: Do not display "X" for removing an identifier if the identifier 
cannot actually be edited.


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

Branch: refs/heads/staging/1.0.0
Commit: ca1db7831bfc7b365f4bb84e2d0f9b082354162f
Parents: 0059121
Author: Michael Jumper 
Authored: Tue Aug 7 13:05:09 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 21:50:26 2018 -0700

--
 .../app/manage/directives/identifierSetEditor.js | 19 +++
 .../manage/templates/identifierSetEditor.html|  3 ++-
 2 files changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ca1db783/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js 
b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
index 4240901..d2936e7 100644
--- a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
+++ b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
@@ -118,6 +118,15 @@ angular.module('manage').directive('identifierSetEditor', 
['$injector',
 $scope.identifierFlags = {};
 
 /**
+ * Map of identifiers to boolean flags indicating whether that
+ * identifier is editable. If an identifier is not editable, it will be
+ * absent from this map.
+ *
+ * @type Object.
+ */
+$scope.isEditable = {};
+
+/**
  * Adds the given identifier to the given sorted array of identifiers,
  * preserving the sorted order of the array. If the identifier is
  * already present, no change is made to the array. The given array
@@ -194,6 +203,16 @@ angular.module('manage').directive('identifierSetEditor', 
['$injector',
 
 });
 
+// An identifier is editable iff it is available to be added or removed
+// from the identifier set being edited (iff it is within the
+// identifiersAvailable array)
+$scope.$watch('identifiersAvailable', function 
availableIdentifiersChanged(identifiers) {
+$scope.isEditable = {};
+angular.forEach(identifiers, function 
storeEditableIdentifier(identifier) {
+$scope.isEditable[identifier] = true;
+});
+});
+
 /**
  * Notifies the controller that a change has been made to the flag
  * denoting presence/absence of a particular identifier within the

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ca1db783/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
--
diff --git 
a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html 
b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
index 7f66088..72c235c 100644
--- a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
+++ b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
@@ -18,7 +18,8 @@
 
 
 {{ identifier }}
+ng-click="removeIdentifier(identifier)"
+ng-show="isEditable[identifier]"/>{{ identifier }}
 
 
 



[06/12] guacamole-client git commit: GUACAMOLE-220: Upgrade to latest versions of jQuery and Lodash.

2018-08-14 Thread vnick
GUACAMOLE-220: Upgrade to latest versions of jQuery and Lodash.

The version of Lodash previously included with Guacamole lacks the
sortedIndexOf() function, which is needed by the identity set editor
directive for manipulating sorted arrays of identifiers.

If upgrading Lodash, may as well upgrade jQuery while we're at it. The
version previously included within Guacamole is no longer maintained.


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

Branch: refs/heads/staging/1.0.0
Commit: 1cf16d1dc6f02e608eb860d627c423dc6be958da
Parents: 615f5c6
Author: Michael Jumper 
Authored: Sat Jul 21 19:41:47 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 guacamole/pom.xml   |  4 +-
 guacamole/src/licenses/LICENSE  | 60 
 .../bundled/jquery-2.1.3/MIT-LICENSE.txt| 21 ---
 .../licenses/bundled/jquery-3.3.1/LICENSE.txt   | 36 
 .../licenses/bundled/lodash-2.4.1/LICENSE.txt   | 22 ---
 .../src/licenses/bundled/lodash-4.17.10/LICENSE | 47 +++
 guacamole/src/main/webapp/index.html|  4 +-
 7 files changed, 137 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/1cf16d1d/guacamole/pom.xml
--
diff --git a/guacamole/pom.xml b/guacamole/pom.xml
index dc4f082..0899e78 100644
--- a/guacamole/pom.xml
+++ b/guacamole/pom.xml
@@ -308,7 +308,7 @@
 
 org.webjars.bower
 lodash
-2.4.1
+4.17.10
 runtime
 
 
@@ -316,7 +316,7 @@
 
 org.webjars.bower
 jquery
-2.1.3
+3.3.1
 runtime
 
 

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/1cf16d1d/guacamole/src/licenses/LICENSE
--
diff --git a/guacamole/src/licenses/LICENSE b/guacamole/src/licenses/LICENSE
index 4474707..51f5b21 100644
--- a/guacamole/src/licenses/LICENSE
+++ b/guacamole/src/licenses/LICENSE
@@ -486,13 +486,21 @@ Jettison (https://github.com/jettison-json/jettison)
 jQuery (http://jquery.com/)
 ---
 
-Version: 2.1.3
-From: 'jQuery Foundation' (http://jquery.com/)
+Version: 3.3.1
+From: 'JS Foundation' (https://js.foundation/)
 License(s):
-MIT (bundled/jquery-2.1.3/MIT-LICENSE.txt)
+MIT (bundled/jquery-3.3.1/LICENSE.txt)
 
-Copyright 2014 jQuery Foundation and other contributors
-http://jquery.com/
+Copyright JS Foundation and other contributors, https://js.foundation/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/jquery
+
+The following license applies to all parts of this software except as
+documented below:
+
+
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
@@ -513,6 +521,13 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
IN AN ACTION
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+
+
+All files located in the node_modules and external directories are
+externally maintained libraries used by this software which have their
+own licenses; we recommend you read them, as their terms may differ from
+the terms above.
+
 
 JSR-250 Reference Implementation
 (https://jcp.org/aboutJava/communityprocess/final/jsr250/index.html)
@@ -536,15 +551,25 @@ JSR-330 / Dependency Injection for Java 
(http://code.google.com/p/atinject/)
 Lodash (https://lodash.com/)
 
 
-Version: 2.4.1
-From: 'The Dojo Foundation' (http://dojofoundation.org/)
+Version: 4.17.10
+From: 'JS Foundation' (https://js.foundation/)
 License(s):
-MIT (bundled/lodash-2.4.1/LICENSE.txt)
+MIT (bundled/lodash-4.17.10/LICENSE)
+
+Copyright JS Foundation and other contributors 
 
-Copyright 2012-2013 The Dojo Foundation 
-Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
 DocumentCloud and Investigative Reporters & Editors 
 
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history

[01/12] guacamole-client git commit: GUACAMOLE-220: Hide identifier set editor if there are no identifiers to edit.

2018-08-14 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/staging/1.0.0 c36d33321 -> 402ddb577


GUACAMOLE-220: Hide identifier set editor if there are no identifiers to edit.

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

Branch: refs/heads/staging/1.0.0
Commit: 0059121716c869e34a8089ada3069ad67ffb6ee7
Parents: 229b0de
Author: Michael Jumper 
Authored: Tue Aug 7 12:25:55 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../app/manage/directives/identifierSetEditor.js  | 14 ++
 .../app/manage/templates/identifierSetEditor.html |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/00591217/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js 
b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
index 82f1109..4240901 100644
--- a/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
+++ b/guacamole/src/main/webapp/app/manage/directives/identifierSetEditor.js
@@ -260,6 +260,20 @@ angular.module('manage').directive('identifierSetEditor', 
['$injector',
 $scope.expanded = false;
 };
 
+/**
+ * Returns whether there are absolutely no identifiers that can be
+ * managed using this editor. If true, the editor is effectively
+ * useless, as there is nothing whatsoever to display.
+ *
+ * @returns {Boolean}
+ * true if there are no identifiers that can be managed using this
+ * editor, false otherwise.
+ */
+$scope.isEmpty = function isEmpty() {
+return _.isEmpty($scope.identifiers)
+&& _.isEmpty($scope.identifiersAvailable);
+};
+
 }];
 
 return directive;

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/00591217/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
--
diff --git 
a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html 
b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
index 838decf..7f66088 100644
--- a/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
+++ b/guacamole/src/main/webapp/app/manage/templates/identifierSetEditor.html
@@ -1,4 +1,4 @@
-
+
 
 {{ header | translate }}
 



[08/12] guacamole-client git commit: GUACAMOLE-220: Add management interface for user parent groups.

2018-08-14 Thread vnick
GUACAMOLE-220: Add management interface for user parent groups.


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

Branch: refs/heads/staging/1.0.0
Commit: de8095740435de7fcfddf263304aa8be2eb553dd
Parents: ca1db78
Author: Michael Jumper 
Authored: Tue Aug 7 12:15:46 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 21:50:26 2018 -0700

--
 .../manage/controllers/manageUserController.js  | 69 ++--
 .../webapp/app/manage/templates/manageUser.html | 11 
 guacamole/src/main/webapp/translations/en.json  |  6 +-
 3 files changed, 80 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/de809574/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
--
diff --git 
a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js 
b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
index e4a91db..7d8397f 100644
--- a/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
+++ b/guacamole/src/main/webapp/app/manage/controllers/manageUserController.js
@@ -36,9 +36,11 @@ angular.module('manage').controller('manageUserController', 
['$scope', '$injecto
 var $q   = $injector.get('$q');
 var authenticationService= $injector.get('authenticationService');
 var dataSourceService= $injector.get('dataSourceService');
+var membershipService= $injector.get('membershipService');
 var permissionService= $injector.get('permissionService');
 var requestService   = $injector.get('requestService');
 var schemaService= $injector.get('schemaService');
+var userGroupService = $injector.get('userGroupService');
 var userService  = $injector.get('userService');
 
 /**
@@ -134,6 +136,46 @@ 
angular.module('manage').controller('manageUserController', ['$scope', '$injecto
 $scope.permissionsRemoved = new PermissionSet();
 
 /**
+ * The identifiers of all user groups which can be manipulated (all groups
+ * for which the user accessing this interface has UPDATE permission),
+ * either through adding the current user as a member or removing the
+ * current user from that group. If this information has not yet been
+ * retrieved, this will be null.
+ *
+ * @type String[]
+ */
+$scope.availableGroups = null;
+
+/**
+ * The identifiers of all user groups of which the user is a member,
+ * taking into account any user groups which will be added/removed when
+ * saved. If this information has not yet been retrieved, this will be
+ * null.
+ *
+ * @type String[]
+ */
+$scope.parentGroups = null;
+
+/**
+ * The set of identifiers of all parent user groups to which the user will
+ * be added when saved. Parent groups will only be present in this set if
+ * they are manually added, and not later manually removed before saving.
+ *
+ * @type String[]
+ */
+$scope.parentGroupsAdded = [];
+
+/**
+ * The set of identifiers of all parent user groups from which the user
+ * will be removed when saved. Parent groups will only be present in this
+ * set if they are manually removed, and not later manually added before
+ * saving.
+ *
+ * @type String[]
+ */
+$scope.parentGroupsRemoved = [];
+
+/**
  * For each applicable data source, the management-related actions that the
  * current user may perform on the user account currently being created
  * or modified, as a map of data source identifier to the
@@ -166,6 +208,8 @@ angular.module('manage').controller('manageUserController', 
['$scope', '$injecto
 return $scope.users !== null
 && $scope.permissionFlags   !== null
 && $scope.managementPermissions !== null
+&& $scope.availableGroups   !== null
+&& $scope.parentGroups  !== null
 && $scope.attributes!== null;
 
 };
@@ -204,12 +248,14 @@ 
angular.module('manage').controller('manageUserController', ['$scope', '$injecto
 var loadExistingUser = function loadExistingUser(dataSource, username) {
 return $q.all({
 users : dataSourceService.apply(userService.getUser, dataSources, 
username),
-permissions : permissionService.getPermissions(dataSource, 
username)
+permissions : permissionService.getPermissions(dataSource, 
username),

[02/12] guacamole-client git commit: GUACAMOLE-220: Add JavaScript service for retrieving/manipulating user groups.

2018-08-14 Thread vnick
GUACAMOLE-220: Add JavaScript service for retrieving/manipulating user groups.


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

Branch: refs/heads/staging/1.0.0
Commit: 9f01fcb1558b11b52c78bcddee2ea601ab4b102c
Parents: c36d333
Author: Michael Jumper 
Authored: Thu Apr 19 14:38:24 2018 -0700
Committer: Michael Jumper 
Committed: Wed Aug 8 09:00:06 2018 -0700

--
 .../webapp/app/rest/services/cacheService.js|   3 +-
 .../app/rest/services/membershipService.js  | 385 +++
 .../app/rest/services/userGroupService.js   | 223 +++
 .../webapp/app/rest/types/RelatedObjectPatch.js |  85 
 .../src/main/webapp/app/rest/types/UserGroup.js |  59 +++
 5 files changed, 754 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9f01fcb1/guacamole/src/main/webapp/app/rest/services/cacheService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/cacheService.js 
b/guacamole/src/main/webapp/app/rest/services/cacheService.js
index 55b7fc1..9a32004 100644
--- a/guacamole/src/main/webapp/app/rest/services/cacheService.js
+++ b/guacamole/src/main/webapp/app/rest/services/cacheService.js
@@ -60,7 +60,8 @@ angular.module('rest').factory('cacheService', ['$injector',
 service.schema = $cacheFactory('API-SCHEMA');
 
 /**
- * Shared cache used by both userService and permissionService.
+ * Shared cache used by userService, userGroupService, permissionService,
+ * and membershipService.
  *
  * @type $cacheFactory.Cache
  */

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9f01fcb1/guacamole/src/main/webapp/app/rest/services/membershipService.js
--
diff --git a/guacamole/src/main/webapp/app/rest/services/membershipService.js 
b/guacamole/src/main/webapp/app/rest/services/membershipService.js
new file mode 100644
index 000..58181c8
--- /dev/null
+++ b/guacamole/src/main/webapp/app/rest/services/membershipService.js
@@ -0,0 +1,385 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Service for operating on user group memberships via the REST API.
+ */
+angular.module('rest').factory('membershipService', ['$injector',
+function membershipService($injector) {
+
+// Required services
+var requestService= $injector.get('requestService');
+var authenticationService = $injector.get('authenticationService');
+var cacheService  = $injector.get('cacheService');
+
+// Required types
+var RelatedObjectPatch = $injector.get('RelatedObjectPatch');
+
+var service = {};
+
+/**
+ * Creates a new array of patches which represents the given changes to an
+ * arbitrary set of objects sharing some common relation.
+ *
+ * @param {String[]} [identifiersToAdd]
+ * The identifiers of all objects which should be added to the
+ * relation, if any.
+ *
+ * @param {String[]} [identifiersToRemove]
+ * The identifiers of all objects which should be removed from the
+ * relation, if any.
+ *
+ * @returns {RelatedObjectPatch[]}
+ * A new array of patches which represents the given changes.
+ */
+var getRelatedObjectPatch = function 
getRelatedObjectPatch(identifiersToAdd, identifiersToRemove) {
+
+var patch = [];
+
+angular.forEach(identifiersToAdd, function addIdentifier(identifier) {
+patch.push(new RelatedObjectPatch({
+op: RelatedObjectPatch.Operation.ADD,
+value : identifier
+}));
+});
+
+angular.forEach(identifiersToRemove, function 
removeIdentifier(identifier) {
+patch.push(new 

[2/2] guacamole-manual git commit: GUACAMOLE-470: Merge document new color-scheme parameter format for SSH and Telnet.

2018-08-21 Thread vnick
GUACAMOLE-470: Merge document new color-scheme parameter format for SSH and 
Telnet.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/563a0e6f
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/563a0e6f
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/563a0e6f

Branch: refs/heads/staging/1.0.0
Commit: 563a0e6fac531e52fb46d0889a6d7ee7e6e5ab91
Parents: 18a11ff 2a08737
Author: Nick Couchman 
Authored: Tue Aug 21 12:26:29 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 21 12:26:29 2018 -0400

--
 src/chapters/configuring.xml | 164 ++
 1 file changed, 150 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/563a0e6f/src/chapters/configuring.xml
--



[1/2] guacamole-manual git commit: GUACAMOLE-470: Document new color-scheme parameter format for SSH and Telnet

2018-08-21 Thread vnick
Repository: guacamole-manual
Updated Branches:
  refs/heads/staging/1.0.0 18a11ff0a -> 563a0e6fa


GUACAMOLE-470: Document new color-scheme parameter format for SSH and Telnet

Document the new format of the color-scheme parameter with some
examples, for SSH and Telnet connections.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/2a087379
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/2a087379
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/2a087379

Branch: refs/heads/staging/1.0.0
Commit: 2a087379c6099892b156034b28850f67dc555388
Parents: 4e1b3b3
Author: Jim Chen 
Authored: Wed Aug 15 23:38:53 2018 -0400
Committer: Jim Chen 
Committed: Tue Aug 21 00:59:21 2018 -0400

--
 src/chapters/configuring.xml | 164 ++
 1 file changed, 150 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/2a087379/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index 58287ae..7ac500f 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -3009,13 +3009,81 @@ ed272546-87bd-4db9-acba-e36e1a9ca20a
 SSH
 color scheme
 The color scheme to use 
for the terminal
-emulator used by SSH connections. Each 
color scheme dictates
-the default foreground and background 
color for the
-terminal. Programs which specify 
colors when printing text
-will override these defaults.
-This parameter is optional. By 
default, Guacamole will
-render text as gray over a black 
background.
-Possible values are:
+emulator used by SSH connections. It 
consists of a
+semicolon-separated series of 
name-value pairs. Each
+name-value pair is separated by a 
colon and assigns a
+value to a color in the terminal 
emulator palette. For
+example, to use blue text on white 
background by default,
+and change the red color to a purple 
shade, you would
+specify:
+
+foreground: 
rgb:00/00/ff;
+background: rgb:ff/ff/ff;
+color9: rgb:80/00/80
+
+This format is similar to the color 
configuration format
+used by Xterm, so Xterm color 
configurations can be easily
+adapted for Guacamole. This parameter 
is optional. If not
+specified, Guacamole will render text 
as gray over a black
+background.
+Possible color names are:
+
+
+
foreground
+
+Set the default 
foreground color.
+
+
+
+
background
+
+Set the default 
background color.
+
+
+
+
colorn
+
+Set the color at index 
n
+on the Xterm 256-color 
palette. For example,
+color9 refers 
to the red color.
+
+
+
+
+Possible color values are:
+
+

[2/3] guacamole-manual git commit: GUACAMOLE-470: Merge document new color-scheme parameter format for SSH and Telnet.

2018-08-21 Thread vnick
GUACAMOLE-470: Merge document new color-scheme parameter format for SSH and 
Telnet.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/563a0e6f
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/563a0e6f
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/563a0e6f

Branch: refs/heads/master
Commit: 563a0e6fac531e52fb46d0889a6d7ee7e6e5ab91
Parents: 18a11ff 2a08737
Author: Nick Couchman 
Authored: Tue Aug 21 12:26:29 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 21 12:26:29 2018 -0400

--
 src/chapters/configuring.xml | 164 ++
 1 file changed, 150 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/563a0e6f/src/chapters/configuring.xml
--



[1/3] guacamole-manual git commit: GUACAMOLE-470: Document new color-scheme parameter format for SSH and Telnet

2018-08-21 Thread vnick
Repository: guacamole-manual
Updated Branches:
  refs/heads/master bd3b4d9a8 -> 37be4cc7e


GUACAMOLE-470: Document new color-scheme parameter format for SSH and Telnet

Document the new format of the color-scheme parameter with some
examples, for SSH and Telnet connections.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/2a087379
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/2a087379
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/2a087379

Branch: refs/heads/master
Commit: 2a087379c6099892b156034b28850f67dc555388
Parents: 4e1b3b3
Author: Jim Chen 
Authored: Wed Aug 15 23:38:53 2018 -0400
Committer: Jim Chen 
Committed: Tue Aug 21 00:59:21 2018 -0400

--
 src/chapters/configuring.xml | 164 ++
 1 file changed, 150 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/2a087379/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index 58287ae..7ac500f 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -3009,13 +3009,81 @@ ed272546-87bd-4db9-acba-e36e1a9ca20a
 SSH
 color scheme
 The color scheme to use 
for the terminal
-emulator used by SSH connections. Each 
color scheme dictates
-the default foreground and background 
color for the
-terminal. Programs which specify 
colors when printing text
-will override these defaults.
-This parameter is optional. By 
default, Guacamole will
-render text as gray over a black 
background.
-Possible values are:
+emulator used by SSH connections. It 
consists of a
+semicolon-separated series of 
name-value pairs. Each
+name-value pair is separated by a 
colon and assigns a
+value to a color in the terminal 
emulator palette. For
+example, to use blue text on white 
background by default,
+and change the red color to a purple 
shade, you would
+specify:
+
+foreground: 
rgb:00/00/ff;
+background: rgb:ff/ff/ff;
+color9: rgb:80/00/80
+
+This format is similar to the color 
configuration format
+used by Xterm, so Xterm color 
configurations can be easily
+adapted for Guacamole. This parameter 
is optional. If not
+specified, Guacamole will render text 
as gray over a black
+background.
+Possible color names are:
+
+
+
foreground
+
+Set the default 
foreground color.
+
+
+
+
background
+
+Set the default 
background color.
+
+
+
+
colorn
+
+Set the color at index 
n
+on the Xterm 256-color 
palette. For example,
+color9 refers 
to the red color.
+
+
+
+
+Possible color values are:
+
+

[3/3] guacamole-manual git commit: Merge 1.0.0 changes back to master.

2018-08-21 Thread vnick
Merge 1.0.0 changes back to master.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/37be4cc7
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/37be4cc7
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/37be4cc7

Branch: refs/heads/master
Commit: 37be4cc7e46f16f8ecfccd7b997e4501098e7566
Parents: bd3b4d9 563a0e6
Author: Nick Couchman 
Authored: Tue Aug 21 12:28:09 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 21 12:28:09 2018 -0400

--
 src/chapters/configuring.xml | 164 ++
 1 file changed, 150 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/37be4cc7/src/chapters/configuring.xml
--



[3/3] guacamole-server git commit: Merge 1.0.0 changes back to master.

2018-08-24 Thread vnick
Merge 1.0.0 changes back to master.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/332e1878
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/332e1878
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/332e1878

Branch: refs/heads/master
Commit: 332e187813595fc2e769f3e29c0582b7ec726ea1
Parents: 911e60c a1ba91b
Author: Nick Couchman 
Authored: Fri Aug 24 12:17:20 2018 -0400
Committer: Nick Couchman 
Committed: Fri Aug 24 12:17:20 2018 -0400

--
 src/terminal/named-colors.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--




[1/3] guacamole-server git commit: GUACAMOLE-470: Support named colors in color-scheme configuration.

2018-08-24 Thread vnick
Repository: guacamole-server
Updated Branches:
  refs/heads/master 911e60cf5 -> 332e18781


GUACAMOLE-470: Support named colors in color-scheme configuration.

When parsing named colors, treat semi-colons as string terminators, so
we can properly parse named colors within the color-scheme
configuration.


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

Branch: refs/heads/master
Commit: eb5aa14a6fac9b10201a48960bacdac274c251be
Parents: 427c4c8
Author: Jim Chen 
Authored: Thu Aug 23 23:36:26 2018 -0400
Committer: Jim Chen 
Committed: Fri Aug 24 10:42:24 2018 -0400

--
 src/terminal/named-colors.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/eb5aa14a/src/terminal/named-colors.c
--
diff --git a/src/terminal/named-colors.c b/src/terminal/named-colors.c
index b0e579b..ab94153 100644
--- a/src/terminal/named-colors.c
+++ b/src/terminal/named-colors.c
@@ -761,8 +761,13 @@ static int guac_terminal_named_color_search(const void* a, 
const void* b) {
 /* Skip any spaces in key (name will never have spaces) */
 while (*key && isspace(*key)) key++;
 
+/* Treat semi-colon as string terminator, to support parsing color
+   names within a larger string (e.g. within the terminal color-scheme
+   configuration string). */
+const int keyChar = (*key == ';') ? '\0' : tolower(*key);
+
 /* Compare, ignoring case (name is already known to be lowercase) */
-int difference = tolower(*key) - *name;
+int difference = keyChar - *name;
 if (difference)
 return difference;
 



[2/3] guacamole-server git commit: GUACAMOLE-470: Merge support named colors in color-scheme configuration.

2018-08-24 Thread vnick
GUACAMOLE-470: Merge support named colors in color-scheme configuration.


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

Branch: refs/heads/master
Commit: a1ba91b01d09c387c3ab3c94ea785b81ea3ddf99
Parents: 427c4c8 eb5aa14
Author: Nick Couchman 
Authored: Fri Aug 24 12:15:58 2018 -0400
Committer: Nick Couchman 
Committed: Fri Aug 24 12:15:58 2018 -0400

--
 src/terminal/named-colors.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--




[1/2] guacamole-server git commit: GUACAMOLE-470: Support named colors in color-scheme configuration.

2018-08-24 Thread vnick
Repository: guacamole-server
Updated Branches:
  refs/heads/staging/1.0.0 427c4c8b4 -> a1ba91b01


GUACAMOLE-470: Support named colors in color-scheme configuration.

When parsing named colors, treat semi-colons as string terminators, so
we can properly parse named colors within the color-scheme
configuration.


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

Branch: refs/heads/staging/1.0.0
Commit: eb5aa14a6fac9b10201a48960bacdac274c251be
Parents: 427c4c8
Author: Jim Chen 
Authored: Thu Aug 23 23:36:26 2018 -0400
Committer: Jim Chen 
Committed: Fri Aug 24 10:42:24 2018 -0400

--
 src/terminal/named-colors.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/eb5aa14a/src/terminal/named-colors.c
--
diff --git a/src/terminal/named-colors.c b/src/terminal/named-colors.c
index b0e579b..ab94153 100644
--- a/src/terminal/named-colors.c
+++ b/src/terminal/named-colors.c
@@ -761,8 +761,13 @@ static int guac_terminal_named_color_search(const void* a, 
const void* b) {
 /* Skip any spaces in key (name will never have spaces) */
 while (*key && isspace(*key)) key++;
 
+/* Treat semi-colon as string terminator, to support parsing color
+   names within a larger string (e.g. within the terminal color-scheme
+   configuration string). */
+const int keyChar = (*key == ';') ? '\0' : tolower(*key);
+
 /* Compare, ignoring case (name is already known to be lowercase) */
-int difference = tolower(*key) - *name;
+int difference = keyChar - *name;
 if (difference)
 return difference;
 



[2/2] guacamole-server git commit: GUACAMOLE-470: Merge support named colors in color-scheme configuration.

2018-08-24 Thread vnick
GUACAMOLE-470: Merge support named colors in color-scheme configuration.


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

Branch: refs/heads/staging/1.0.0
Commit: a1ba91b01d09c387c3ab3c94ea785b81ea3ddf99
Parents: 427c4c8 eb5aa14
Author: Nick Couchman 
Authored: Fri Aug 24 12:15:58 2018 -0400
Committer: Nick Couchman 
Committed: Fri Aug 24 12:15:58 2018 -0400

--
 src/terminal/named-colors.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--




[4/4] guacamole-server git commit: GUACAMOLE-610: Merge add support for changing scrollback buffer size.

2018-08-19 Thread vnick
GUACAMOLE-610: Merge add support for changing scrollback buffer size.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/911e60cf
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/911e60cf
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/911e60cf

Branch: refs/heads/master
Commit: 911e60cf5c4be6bf87a6164b2556ab9ab32e91dd
Parents: 0062f61 994cb95
Author: Nick Couchman 
Authored: Sun Aug 19 14:49:26 2018 -0400
Committer: Nick Couchman 
Committed: Sun Aug 19 14:49:26 2018 -0400

--
 bin/guacctl   |  56 
 src/protocols/ssh/settings.c  |  11 +++
 src/protocols/ssh/settings.h  |  10 ++
 src/protocols/ssh/ssh.c   |   2 +-
 src/protocols/telnet/settings.c   |  11 +++
 src/protocols/telnet/settings.h   |  10 ++
 src/protocols/telnet/telnet.c |   2 +-
 src/terminal/terminal.c   | 121 +
 src/terminal/terminal/terminal.h  |  58 +++-
 src/terminal/terminal/terminal_handlers.h |  18 
 src/terminal/terminal_handlers.c  |  37 
 11 files changed, 314 insertions(+), 22 deletions(-)
--




[2/4] guacamole-server git commit: GUACAMOLE-610: Allow scrollback size to be specified for SSH and telnet.

2018-08-19 Thread vnick
GUACAMOLE-610: Allow scrollback size to be specified for SSH and telnet.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/0e6d549a
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/0e6d549a
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/0e6d549a

Branch: refs/heads/master
Commit: 0e6d549a40eaf4ddfa58cdb433c7815a51b82988
Parents: 6a576f0
Author: Michael Jumper 
Authored: Mon Aug 13 00:48:46 2018 -0700
Committer: Michael Jumper 
Committed: Sat Aug 18 11:12:55 2018 -0700

--
 src/protocols/ssh/settings.c | 11 
 src/protocols/ssh/settings.h | 10 
 src/protocols/ssh/ssh.c  |  2 +-
 src/protocols/telnet/settings.c  | 11 
 src/protocols/telnet/settings.h  | 10 
 src/protocols/telnet/telnet.c|  2 +-
 src/terminal/terminal.c  | 99 +--
 src/terminal/terminal/terminal.h | 32 ++-
 8 files changed, 158 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0e6d549a/src/protocols/ssh/settings.c
--
diff --git a/src/protocols/ssh/settings.c b/src/protocols/ssh/settings.c
index 7cfe404..e0be6cf 100644
--- a/src/protocols/ssh/settings.c
+++ b/src/protocols/ssh/settings.c
@@ -59,6 +59,7 @@ const char* GUAC_SSH_CLIENT_ARGS[] = {
 "server-alive-interval",
 "backspace",
 "terminal-type",
+"scrollback",
 NULL
 };
 
@@ -232,6 +233,11 @@ enum SSH_ARGS_IDX {
  */
 IDX_TERMINAL_TYPE,
 
+/**
+ * The maximum size of the scrollback buffer in rows.
+ */
+IDX_SCROLLBACK,
+
 SSH_ARGS_COUNT
 };
 
@@ -274,6 +280,11 @@ guac_ssh_settings* guac_ssh_parse_args(guac_user* user,
 guac_user_parse_args_string(user, GUAC_SSH_CLIENT_ARGS, argv,
 IDX_PASSPHRASE, NULL);
 
+/* Read maximum scrollback size */
+settings->max_scrollback =
+guac_user_parse_args_int(user, GUAC_SSH_CLIENT_ARGS, argv,
+IDX_SCROLLBACK, GUAC_SSH_DEFAULT_MAX_SCROLLBACK);
+
 /* Read font name */
 settings->font_name =
 guac_user_parse_args_string(user, GUAC_SSH_CLIENT_ARGS, argv,

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0e6d549a/src/protocols/ssh/settings.h
--
diff --git a/src/protocols/ssh/settings.h b/src/protocols/ssh/settings.h
index 761239c..81dcd69 100644
--- a/src/protocols/ssh/settings.h
+++ b/src/protocols/ssh/settings.h
@@ -59,6 +59,11 @@
 #define GUAC_SSH_DEFAULT_POLL_TIMEOUT 1000
 
 /**
+ * The default maximum scrollback size in rows.
+ */
+#define GUAC_SSH_DEFAULT_MAX_SCROLLBACK 1000
+
+/**
  * Settings for the SSH connection. The values for this structure are parsed
  * from the arguments given during the Guacamole protocol handshake using the
  * guac_ssh_parse_args() function.
@@ -116,6 +121,11 @@ typedef struct guac_ssh_settings {
 char* command;
 
 /**
+ * The maximum size of the scrollback buffer in rows.
+ */
+int max_scrollback;
+
+/**
  * The name of the font to use for display rendering.
  */
 char* font_name;

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0e6d549a/src/protocols/ssh/ssh.c
--
diff --git a/src/protocols/ssh/ssh.c b/src/protocols/ssh/ssh.c
index a116281..59554fb 100644
--- a/src/protocols/ssh/ssh.c
+++ b/src/protocols/ssh/ssh.c
@@ -207,7 +207,7 @@ void* ssh_client_thread(void* data) {
 
 /* Create terminal */
 ssh_client->term = guac_terminal_create(client, ssh_client->clipboard,
-settings->font_name, settings->font_size,
+settings->max_scrollback, settings->font_name, settings->font_size,
 settings->resolution, settings->width, settings->height,
 settings->color_scheme, settings->backspace);
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0e6d549a/src/protocols/telnet/settings.c
--
diff --git a/src/protocols/telnet/settings.c b/src/protocols/telnet/settings.c
index 6e4a773..bef5cfa 100644
--- a/src/protocols/telnet/settings.c
+++ b/src/protocols/telnet/settings.c
@@ -52,6 +52,7 @@ const char* GUAC_TELNET_CLIENT_ARGS[] = {
 "read-only",
 "backspace",
 "terminal-type",
+"scrollback",
 NULL
 };
 
@@ -190,6 +191,11 @@ enum TELNET_ARGS_IDX {
  */
 IDX_TERMINAL_TYPE,
 
+/**
+ * The maximum size of the scrollback buffer in rows.
+ */
+IDX_SCROLLBACK,
+
 TELNET_ARGS_COUNT
 };
 
@@ -274,6 +280,11 @@ guac_telnet_settings* guac_telnet_parse_args(guac_user* 
user,
 

[3/4] guacamole-server git commit: GUACAMOLE-610: Add console code for altering scrollback size on the fly.

2018-08-19 Thread vnick
GUACAMOLE-610: Add console code for altering scrollback size on the fly.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/994cb958
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/994cb958
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/994cb958

Branch: refs/heads/master
Commit: 994cb95893aa1e136626b5ec4bdd4c4d22d044f5
Parents: 0e6d549
Author: Michael Jumper 
Authored: Mon Aug 13 00:50:05 2018 -0700
Committer: Michael Jumper 
Committed: Sat Aug 18 11:26:12 2018 -0700

--
 bin/guacctl   | 56 ++
 src/terminal/terminal.c   | 15 +--
 src/terminal/terminal/terminal.h  | 15 +++
 src/terminal/terminal/terminal_handlers.h | 18 +
 src/terminal/terminal_handlers.c  | 37 +
 5 files changed, 127 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/994cb958/bin/guacctl
--
diff --git a/bin/guacctl b/bin/guacctl
index a489830..2d6d263 100755
--- a/bin/guacctl
+++ b/bin/guacctl
@@ -91,6 +91,18 @@ send_close_pipe_stream() {
 }
 
 ##
+## Sends the Guacamole-specific console code for resizing the scrollback
+## buffer.
+##
+## @param ROWS
+## The number of rows that the scrollback buffer should contain.
+##
+send_resize_scrollback() {
+ROWS="$1"
+printf "\033]482204;%s\007" "$ROWS"
+}
+
+##
 ## Prints the given error text to STDERR.
 ##
 ## @param ...
@@ -115,6 +127,8 @@ Usage: guacctl [OPTION] [FILE or NAME]...
name.
 -c, --close-pipe   close any existing pipe stream and redirect output
back to the terminal emulator.
+-S, --scrollback   request that the scrollback buffer be limited to the
+   given number of rows.
 END
 }
 
@@ -243,6 +257,39 @@ close_pipe_stream() {
 
 }
 
+##
+## Resizes the scrollback buffer to the given number of rows.
+##
+## @param ...
+## The number of rows that should be contained within the scrollback
+## buffer, as provided to guacctl.
+##
+resize_scrollback() {
+
+#
+# Validate arguments
+#
+
+if [ $# -lt 1 ]; then
+error "No row count specified."
+return;
+fi
+
+if [ $# -gt 1 ]; then
+error "Only one row count may be given."
+return;
+fi
+
+#
+# Send code for resizing scrollback
+#
+
+ROWS="$1"
+send_resize_scrollback "$ROWS"
+
+}
+
+
 #
 # Get script name
 #
@@ -301,6 +348,15 @@ case "$1" in
 ;;
 
 #
+# Resize scrollback
+#
+
+"--scrollback"|"-S")
+shift
+resize_scrollback "$@"
+;;
+
+#
 # Show usage info if options are invalid
 #
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/994cb958/src/terminal/terminal.c
--
diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c
index 1c105dc..760e128 100644
--- a/src/terminal/terminal.c
+++ b/src/terminal/terminal.c
@@ -185,20 +185,7 @@ static int 
guac_terminal_effective_buffer_length(guac_terminal* term) {
 
 }
 
-/**
- * Returns the number of rows within the buffer of the given terminal which are
- * not currently displayed on screen. Adjustments to the desired scrollback
- * size are taken into account, and rows which are within the buffer but
- * unavailable due to being outside the desired scrollback range are ignored.
- *
- * @param term
- * The terminal whose off-screen row count should be determined.
- *
- * @return
- * The number of rows within the buffer which are not currently displayed
- * on screen.
- */
-static int guac_terminal_available_scroll(guac_terminal* term) {
+int guac_terminal_available_scroll(guac_terminal* term) {
 return guac_terminal_effective_buffer_length(term) - term->term_height;
 }
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/994cb958/src/terminal/terminal/terminal.h
--
diff --git a/src/terminal/terminal/terminal.h b/src/terminal/terminal/terminal.h
index d68405b..bddf8e5 100644
--- a/src/terminal/terminal/terminal.h
+++ b/src/terminal/terminal/terminal.h
@@ -1063,5 +1063,20 @@ void guac_terminal_pipe_stream_close(guac_terminal* 
term);
 int guac_terminal_create_typescript(guac_terminal* term, const char* path,
 const char* name, int create_path);
 
+/**
+ * Returns the number of rows within the buffer of the given terminal which are
+ * not currently displayed on screen. Adjustments to the desired scrollback
+ * size are taken into account, and rows which are within the buffer but
+ * 

[1/4] guacamole-server git commit: GUACAMOLE-610: Limit terminal width/height to 1024 characters.

2018-08-19 Thread vnick
Repository: guacamole-server
Updated Branches:
  refs/heads/master 0062f61d6 -> 911e60cf5


GUACAMOLE-610: Limit terminal width/height to 1024 characters.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/6a576f01
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/6a576f01
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/6a576f01

Branch: refs/heads/master
Commit: 6a576f012184b9c2dba9117ad870cab1bd012818
Parents: 0062f61
Author: Michael Jumper 
Authored: Sun Aug 12 22:37:24 2018 -0700
Committer: Michael Jumper 
Committed: Sat Aug 18 11:12:50 2018 -0700

--
 src/terminal/terminal.c  | 35 ---
 src/terminal/terminal/terminal.h | 11 +++
 2 files changed, 43 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/6a576f01/src/terminal/terminal.c
--
diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c
index ae34fdd..4447789 100644
--- a/src/terminal/terminal.c
+++ b/src/terminal/terminal.c
@@ -590,13 +590,29 @@ guac_terminal* guac_terminal_create(guac_client* client,
 term->default_char = default_char;
 term->clipboard = clipboard;
 
+/* Calculate character size */
+int rows= height / term->display->char_height;
+int columns = available_width / term->display->char_width;
+
+/* Keep height within predefined maximum */
+if (rows > GUAC_TERMINAL_MAX_ROWS) {
+rows = GUAC_TERMINAL_MAX_ROWS;
+height = rows * term->display->char_height;
+}
+
+/* Keep width within predefined maximum */
+if (columns > GUAC_TERMINAL_MAX_COLUMNS) {
+columns = GUAC_TERMINAL_MAX_COLUMNS;
+available_width = columns * term->display->char_width;
+width = available_width + GUAC_TERMINAL_SCROLLBAR_WIDTH;
+}
+
 /* Set pixel size */
 term->width = width;
 term->height = height;
 
-/* Calculate character size */
-term->term_width   = available_width / term->display->char_width;
-term->term_height  = height / term->display->char_height;
+term->term_width  = columns;
+term->term_height = rows;
 
 /* Open STDIN pipe */
 if (pipe(term->stdin_pipe_fd)) {
@@ -1508,6 +1524,19 @@ int guac_terminal_resize(guac_terminal* terminal, int 
width, int height) {
 int rows= height / display->char_height;
 int columns = available_width / display->char_width;
 
+/* Keep height within predefined maximum */
+if (rows > GUAC_TERMINAL_MAX_ROWS) {
+rows = GUAC_TERMINAL_MAX_ROWS;
+height = rows * display->char_height;
+}
+
+/* Keep width within predefined maximum */
+if (columns > GUAC_TERMINAL_MAX_COLUMNS) {
+columns = GUAC_TERMINAL_MAX_COLUMNS;
+available_width = columns * display->char_width;
+width = available_width + GUAC_TERMINAL_SCROLLBAR_WIDTH;
+}
+
 /* Set pixel sizes */
 terminal->width = width;
 terminal->height = height;

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/6a576f01/src/terminal/terminal/terminal.h
--
diff --git a/src/terminal/terminal/terminal.h b/src/terminal/terminal/terminal.h
index f153252..42a741a 100644
--- a/src/terminal/terminal/terminal.h
+++ b/src/terminal/terminal/terminal.h
@@ -38,6 +38,17 @@
 #include 
 
 /**
+ * The absolute maximum number of rows to allow within the display.
+ */
+#define GUAC_TERMINAL_MAX_ROWS 1024
+
+/**
+ * The absolute maximum number of columns to allow within the display. This
+ * implicitly limits the number of columns allowed within the buffer.
+ */
+#define GUAC_TERMINAL_MAX_COLUMNS 1024
+
+/**
  * The maximum duration of a single frame, in milliseconds.
  */
 #define GUAC_TERMINAL_FRAME_DURATION 40



[1/2] guacamole-manual git commit: GUACAMOLE-565: Document terminal-type parameter for SSH and Telnet

2018-08-21 Thread vnick
Repository: guacamole-manual
Updated Branches:
  refs/heads/staging/1.0.0 4e1b3b3a5 -> 18a11ff0a


GUACAMOLE-565: Document terminal-type parameter for SSH and Telnet

Document the new terminal-type parameter for SSH and Telnet connections.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/6f8c3dcb
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/6f8c3dcb
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/6f8c3dcb

Branch: refs/heads/staging/1.0.0
Commit: 6f8c3dcb1a26c7303a9aa88a36b3dd3377c59cc0
Parents: 4e1b3b3
Author: Jim Chen 
Authored: Wed Aug 15 23:51:34 2018 -0400
Committer: Jim Chen 
Committed: Tue Aug 21 00:57:13 2018 -0400

--
 src/chapters/configuring.xml | 25 +
 1 file changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/6f8c3dcb/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index 58287ae..f1650b9 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -3142,6 +3142,18 @@ ed272546-87bd-4db9-acba-e36e1a9ca20a
 sends ASCII code 127 (Delete) if this 
option is not set.
 
 
+
+
terminal-type
+
+
+SSH
+terminal 
type
+This parameter sets the 
terminal emulator type
+string that is passed to the SSH 
server. This parameter is
+optional. If not specified, 
linux
+is used as the terminal emulator type 
by default.
+
+
 
 
 
@@ -3767,6 +3779,19 @@ guaclog: INFO: All files interpreted 
successfully.
 sends ASCII code 127 (Delete) if this 
option is not set.
 
 
+
+
terminal-type
+
+
+telnet
+terminal 
type
+This parameter sets the 
terminal emulator type
+string that is passed to the telnet 
server. This parameter
+is optional. If not specified,
+linux is used 
as the terminal
+emulator type by default.
+
+
 
 
 



[3/3] guacamole-manual git commit: Merge 1.0.0 changes back to master.

2018-08-21 Thread vnick
Merge 1.0.0 changes back to master.


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

Branch: refs/heads/master
Commit: bd3b4d9a8abbb51aeccec0b42edab2115d754be8
Parents: c0f679c 18a11ff
Author: Nick Couchman 
Authored: Tue Aug 21 12:15:58 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 21 12:15:58 2018 -0400

--
 src/chapters/configuring.xml | 25 +
 1 file changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/bd3b4d9a/src/chapters/configuring.xml
--



[1/3] guacamole-manual git commit: GUACAMOLE-565: Document terminal-type parameter for SSH and Telnet

2018-08-21 Thread vnick
Repository: guacamole-manual
Updated Branches:
  refs/heads/master c0f679cbf -> bd3b4d9a8


GUACAMOLE-565: Document terminal-type parameter for SSH and Telnet

Document the new terminal-type parameter for SSH and Telnet connections.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/6f8c3dcb
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/6f8c3dcb
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/6f8c3dcb

Branch: refs/heads/master
Commit: 6f8c3dcb1a26c7303a9aa88a36b3dd3377c59cc0
Parents: 4e1b3b3
Author: Jim Chen 
Authored: Wed Aug 15 23:51:34 2018 -0400
Committer: Jim Chen 
Committed: Tue Aug 21 00:57:13 2018 -0400

--
 src/chapters/configuring.xml | 25 +
 1 file changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/6f8c3dcb/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index 58287ae..f1650b9 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -3142,6 +3142,18 @@ ed272546-87bd-4db9-acba-e36e1a9ca20a
 sends ASCII code 127 (Delete) if this 
option is not set.
 
 
+
+
terminal-type
+
+
+SSH
+terminal 
type
+This parameter sets the 
terminal emulator type
+string that is passed to the SSH 
server. This parameter is
+optional. If not specified, 
linux
+is used as the terminal emulator type 
by default.
+
+
 
 
 
@@ -3767,6 +3779,19 @@ guaclog: INFO: All files interpreted 
successfully.
 sends ASCII code 127 (Delete) if this 
option is not set.
 
 
+
+
terminal-type
+
+
+telnet
+terminal 
type
+This parameter sets the 
terminal emulator type
+string that is passed to the telnet 
server. This parameter
+is optional. If not specified,
+linux is used 
as the terminal
+emulator type by default.
+
+
 
 
 



[2/2] guacamole-manual git commit: GUACAMOLE-565: Merge document terminal-type parameter for SSH and Telnet.

2018-08-21 Thread vnick
GUACAMOLE-565: Merge document terminal-type parameter for SSH and Telnet.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/18a11ff0
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/18a11ff0
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/18a11ff0

Branch: refs/heads/staging/1.0.0
Commit: 18a11ff0abd23c3728ae9dbe5bbe714850b5c348
Parents: 4e1b3b3 6f8c3dc
Author: Nick Couchman 
Authored: Tue Aug 21 12:14:46 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 21 12:14:46 2018 -0400

--
 src/chapters/configuring.xml | 25 +
 1 file changed, 25 insertions(+)
--




[2/3] guacamole-manual git commit: GUACAMOLE-565: Merge document terminal-type parameter for SSH and Telnet.

2018-08-21 Thread vnick
GUACAMOLE-565: Merge document terminal-type parameter for SSH and Telnet.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/18a11ff0
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/18a11ff0
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/18a11ff0

Branch: refs/heads/master
Commit: 18a11ff0abd23c3728ae9dbe5bbe714850b5c348
Parents: 4e1b3b3 6f8c3dc
Author: Nick Couchman 
Authored: Tue Aug 21 12:14:46 2018 -0400
Committer: Nick Couchman 
Committed: Tue Aug 21 12:14:46 2018 -0400

--
 src/chapters/configuring.xml | 25 +
 1 file changed, 25 insertions(+)
--




[2/3] guacamole-client git commit: GUACAMOLE-220: Merge add missing definitions for CREATE_USER_GROUP system permission.

2018-09-08 Thread vnick
GUACAMOLE-220: Merge add missing definitions for CREATE_USER_GROUP system 
permission.


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

Branch: refs/heads/master
Commit: 248e64531da5232aeb7ea47f0933d51967cc467d
Parents: 7640065 3492b55
Author: Nick Couchman 
Authored: Sat Sep 8 18:40:10 2018 -0400
Committer: Nick Couchman 
Committed: Sat Sep 8 18:40:10 2018 -0400

--
 .../apache/guacamole/net/auth/permission/SystemPermission.java  | 5 +
 guacamole/src/main/webapp/app/rest/types/PermissionSet.js   | 5 +
 2 files changed, 10 insertions(+)
--




[1/3] guacamole-client git commit: GUACAMOLE-220: Add missing definitions for CREATE_USER_GROUP system permission.

2018-09-08 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/master af0f8ea27 -> d32060629


GUACAMOLE-220: Add missing definitions for CREATE_USER_GROUP system permission.


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

Branch: refs/heads/master
Commit: 3492b556c39ecf5fc3301d35fbb2cc282bb796cb
Parents: 402ddb5
Author: Michael Jumper 
Authored: Sat Sep 8 13:01:03 2018 -0700
Committer: Michael Jumper 
Committed: Sat Sep 8 13:09:24 2018 -0700

--
 .../apache/guacamole/net/auth/permission/SystemPermission.java  | 5 +
 guacamole/src/main/webapp/app/rest/types/PermissionSet.js   | 5 +
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/3492b556/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
--
diff --git 
a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
 
b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
index b54ba90..054caf0 100644
--- 
a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
+++ 
b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
@@ -38,6 +38,11 @@ public class SystemPermission implements 
Permission {
 CREATE_USER,
 
 /**
+ * Create user groups.
+ */
+CREATE_USER_GROUP,
+
+/**
  * Create connections.
  */
 CREATE_CONNECTION,

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/3492b556/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/PermissionSet.js 
b/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
index 2bc2e9e..9dd1ac8 100644
--- a/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
+++ b/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
@@ -143,6 +143,11 @@ angular.module('rest').factory('PermissionSet', [function 
definePermissionSet()
 CREATE_USER : "CREATE_USER",
 
 /**
+ * Permission to create new user groups.
+ */
+CREATE_USER_GROUP : "CREATE_USER_GROUP",
+
+/**
  * Permission to create new connections.
  */
 CREATE_CONNECTION : "CREATE_CONNECTION",



[1/2] guacamole-client git commit: GUACAMOLE-220: Add missing definitions for CREATE_USER_GROUP system permission.

2018-09-08 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/staging/1.0.0 764006534 -> 248e64531


GUACAMOLE-220: Add missing definitions for CREATE_USER_GROUP system permission.


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

Branch: refs/heads/staging/1.0.0
Commit: 3492b556c39ecf5fc3301d35fbb2cc282bb796cb
Parents: 402ddb5
Author: Michael Jumper 
Authored: Sat Sep 8 13:01:03 2018 -0700
Committer: Michael Jumper 
Committed: Sat Sep 8 13:09:24 2018 -0700

--
 .../apache/guacamole/net/auth/permission/SystemPermission.java  | 5 +
 guacamole/src/main/webapp/app/rest/types/PermissionSet.js   | 5 +
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/3492b556/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
--
diff --git 
a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
 
b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
index b54ba90..054caf0 100644
--- 
a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
+++ 
b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
@@ -38,6 +38,11 @@ public class SystemPermission implements 
Permission {
 CREATE_USER,
 
 /**
+ * Create user groups.
+ */
+CREATE_USER_GROUP,
+
+/**
  * Create connections.
  */
 CREATE_CONNECTION,

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/3492b556/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
--
diff --git a/guacamole/src/main/webapp/app/rest/types/PermissionSet.js 
b/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
index 2bc2e9e..9dd1ac8 100644
--- a/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
+++ b/guacamole/src/main/webapp/app/rest/types/PermissionSet.js
@@ -143,6 +143,11 @@ angular.module('rest').factory('PermissionSet', [function 
definePermissionSet()
 CREATE_USER : "CREATE_USER",
 
 /**
+ * Permission to create new user groups.
+ */
+CREATE_USER_GROUP : "CREATE_USER_GROUP",
+
+/**
  * Permission to create new connections.
  */
 CREATE_CONNECTION : "CREATE_CONNECTION",



[2/2] guacamole-client git commit: GUACAMOLE-220: Merge add missing definitions for CREATE_USER_GROUP system permission.

2018-09-08 Thread vnick
GUACAMOLE-220: Merge add missing definitions for CREATE_USER_GROUP system 
permission.


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

Branch: refs/heads/staging/1.0.0
Commit: 248e64531da5232aeb7ea47f0933d51967cc467d
Parents: 7640065 3492b55
Author: Nick Couchman 
Authored: Sat Sep 8 18:40:10 2018 -0400
Committer: Nick Couchman 
Committed: Sat Sep 8 18:40:10 2018 -0400

--
 .../apache/guacamole/net/auth/permission/SystemPermission.java  | 5 +
 guacamole/src/main/webapp/app/rest/types/PermissionSet.js   | 5 +
 2 files changed, 10 insertions(+)
--




[2/2] guacamole-client git commit: GUACAMOLE-220: Merge correct handling of permission-filtered directory search.

2018-09-08 Thread vnick
GUACAMOLE-220: Merge correct handling of permission-filtered directory search.


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

Branch: refs/heads/staging/1.0.0
Commit: d23f88f23652b49f1b28784080b26831e0f9ab97
Parents: 248e645 2161260
Author: Nick Couchman 
Authored: Sat Sep 8 18:44:00 2018 -0400
Committer: Nick Couchman 
Committed: Sat Sep 8 18:44:00 2018 -0400

--
 .../ActiveConnectionDirectoryResource.java  |  9 
 .../connection/ConnectionDirectoryResource.java |  9 
 .../ConnectionGroupDirectoryResource.java   |  8 +++
 .../rest/directory/DirectoryResource.java   | 22 +++-
 .../SharingProfileDirectoryResource.java|  9 
 .../rest/user/UserDirectoryResource.java|  9 
 .../usergroup/UserGroupDirectoryResource.java   |  9 
 7 files changed, 74 insertions(+), 1 deletion(-)
--




[1/2] guacamole-client git commit: GUACAMOLE-220: Correct handling of permission-filtered directory search.

2018-09-08 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/staging/1.0.0 248e64531 -> d23f88f23


GUACAMOLE-220: Correct handling of permission-filtered directory search.

The correct ObjectPermissionSet should be used to filter the identifiers
used. Previous code was always using the ObjectPermissionSet specific to
permissions affecting user objects, and thus was incorrect for all other
types of objects (connections, connection groups, etc.).


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

Branch: refs/heads/staging/1.0.0
Commit: 2161260e34505d7f30ba22cdfde5f19c71de4626
Parents: 402ddb5
Author: Michael Jumper 
Authored: Sat Sep 8 13:04:25 2018 -0700
Committer: Michael Jumper 
Committed: Sat Sep 8 13:09:59 2018 -0700

--
 .../ActiveConnectionDirectoryResource.java  |  9 
 .../connection/ConnectionDirectoryResource.java |  9 
 .../ConnectionGroupDirectoryResource.java   |  8 +++
 .../rest/directory/DirectoryResource.java   | 22 +++-
 .../SharingProfileDirectoryResource.java|  9 
 .../rest/user/UserDirectoryResource.java|  9 
 .../usergroup/UserGroupDirectoryResource.java   |  9 
 7 files changed, 74 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/2161260e/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
 
b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
index 5665ccf..5296565 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
@@ -24,9 +24,12 @@ import com.google.inject.assistedinject.AssistedInject;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
+import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.net.auth.ActiveConnection;
 import org.apache.guacamole.net.auth.Directory;
+import org.apache.guacamole.net.auth.Permissions;
 import org.apache.guacamole.net.auth.UserContext;
+import org.apache.guacamole.net.auth.permission.ObjectPermissionSet;
 import org.apache.guacamole.rest.directory.DirectoryObjectResourceFactory;
 import org.apache.guacamole.rest.directory.DirectoryObjectTranslator;
 import org.apache.guacamole.rest.directory.DirectoryResource;
@@ -67,4 +70,10 @@ public class ActiveConnectionDirectoryResource
 super(userContext, directory, translator, resourceFactory);
 }
 
+@Override
+protected ObjectPermissionSet getObjectPermissions(Permissions permissions)
+throws GuacamoleException {
+return permissions.getActiveConnectionPermissions();
+}
+
 }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/2161260e/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
 
b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
index ce35071..88408a7 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
@@ -24,9 +24,12 @@ import com.google.inject.assistedinject.AssistedInject;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
+import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.net.auth.Connection;
 import org.apache.guacamole.net.auth.Directory;
+import org.apache.guacamole.net.auth.Permissions;
 import org.apache.guacamole.net.auth.UserContext;
+import org.apache.guacamole.net.auth.permission.ObjectPermissionSet;
 import org.apache.guacamole.rest.directory.DirectoryObjectResourceFactory;
 import org.apache.guacamole.rest.directory.DirectoryObjectTranslator;
 import org.apache.guacamole.rest.directory.DirectoryResource;
@@ -66,4 +69,10 @@ public class ConnectionDirectoryResource
 super(userContext, directory, translator, resourceFactory);
 }
 
+@Override
+protected ObjectPermissionSet 

[3/3] guacamole-client git commit: Merge 1.0.0 changes back to master.

2018-09-08 Thread vnick
Merge 1.0.0 changes back to master.


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

Branch: refs/heads/master
Commit: d37100dc1fdf15e1d017a999684f9415254aefe5
Parents: d320606 d23f88f
Author: Nick Couchman 
Authored: Sat Sep 8 18:45:21 2018 -0400
Committer: Nick Couchman 
Committed: Sat Sep 8 18:45:21 2018 -0400

--
 .../ActiveConnectionDirectoryResource.java  |  9 
 .../connection/ConnectionDirectoryResource.java |  9 
 .../ConnectionGroupDirectoryResource.java   |  8 +++
 .../rest/directory/DirectoryResource.java   | 22 +++-
 .../SharingProfileDirectoryResource.java|  9 
 .../rest/user/UserDirectoryResource.java|  9 
 .../usergroup/UserGroupDirectoryResource.java   |  9 
 7 files changed, 74 insertions(+), 1 deletion(-)
--




[1/3] guacamole-client git commit: GUACAMOLE-220: Correct handling of permission-filtered directory search.

2018-09-08 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/master d32060629 -> d37100dc1


GUACAMOLE-220: Correct handling of permission-filtered directory search.

The correct ObjectPermissionSet should be used to filter the identifiers
used. Previous code was always using the ObjectPermissionSet specific to
permissions affecting user objects, and thus was incorrect for all other
types of objects (connections, connection groups, etc.).


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

Branch: refs/heads/master
Commit: 2161260e34505d7f30ba22cdfde5f19c71de4626
Parents: 402ddb5
Author: Michael Jumper 
Authored: Sat Sep 8 13:04:25 2018 -0700
Committer: Michael Jumper 
Committed: Sat Sep 8 13:09:59 2018 -0700

--
 .../ActiveConnectionDirectoryResource.java  |  9 
 .../connection/ConnectionDirectoryResource.java |  9 
 .../ConnectionGroupDirectoryResource.java   |  8 +++
 .../rest/directory/DirectoryResource.java   | 22 +++-
 .../SharingProfileDirectoryResource.java|  9 
 .../rest/user/UserDirectoryResource.java|  9 
 .../usergroup/UserGroupDirectoryResource.java   |  9 
 7 files changed, 74 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/2161260e/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
 
b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
index 5665ccf..5296565 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java
@@ -24,9 +24,12 @@ import com.google.inject.assistedinject.AssistedInject;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
+import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.net.auth.ActiveConnection;
 import org.apache.guacamole.net.auth.Directory;
+import org.apache.guacamole.net.auth.Permissions;
 import org.apache.guacamole.net.auth.UserContext;
+import org.apache.guacamole.net.auth.permission.ObjectPermissionSet;
 import org.apache.guacamole.rest.directory.DirectoryObjectResourceFactory;
 import org.apache.guacamole.rest.directory.DirectoryObjectTranslator;
 import org.apache.guacamole.rest.directory.DirectoryResource;
@@ -67,4 +70,10 @@ public class ActiveConnectionDirectoryResource
 super(userContext, directory, translator, resourceFactory);
 }
 
+@Override
+protected ObjectPermissionSet getObjectPermissions(Permissions permissions)
+throws GuacamoleException {
+return permissions.getActiveConnectionPermissions();
+}
+
 }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/2161260e/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
 
b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
index ce35071..88408a7 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java
@@ -24,9 +24,12 @@ import com.google.inject.assistedinject.AssistedInject;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
+import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.net.auth.Connection;
 import org.apache.guacamole.net.auth.Directory;
+import org.apache.guacamole.net.auth.Permissions;
 import org.apache.guacamole.net.auth.UserContext;
+import org.apache.guacamole.net.auth.permission.ObjectPermissionSet;
 import org.apache.guacamole.rest.directory.DirectoryObjectResourceFactory;
 import org.apache.guacamole.rest.directory.DirectoryObjectTranslator;
 import org.apache.guacamole.rest.directory.DirectoryResource;
@@ -66,4 +69,10 @@ public class ConnectionDirectoryResource
 super(userContext, directory, translator, resourceFactory);
 }
 
+@Override
+protected ObjectPermissionSet 

[2/3] guacamole-client git commit: GUACAMOLE-220: Merge correct handling of permission-filtered directory search.

2018-09-08 Thread vnick
GUACAMOLE-220: Merge correct handling of permission-filtered directory search.


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

Branch: refs/heads/master
Commit: d23f88f23652b49f1b28784080b26831e0f9ab97
Parents: 248e645 2161260
Author: Nick Couchman 
Authored: Sat Sep 8 18:44:00 2018 -0400
Committer: Nick Couchman 
Committed: Sat Sep 8 18:44:00 2018 -0400

--
 .../ActiveConnectionDirectoryResource.java  |  9 
 .../connection/ConnectionDirectoryResource.java |  9 
 .../ConnectionGroupDirectoryResource.java   |  8 +++
 .../rest/directory/DirectoryResource.java   | 22 +++-
 .../SharingProfileDirectoryResource.java|  9 
 .../rest/user/UserDirectoryResource.java|  9 
 .../usergroup/UserGroupDirectoryResource.java   |  9 
 7 files changed, 74 insertions(+), 1 deletion(-)
--




[1/2] guacamole-client git commit: GUACAMOLE-598: Ensure fatal error message is hidden by default, shown only when a fatal error has actually occurred.

2018-09-07 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/master 0484a4e48 -> af0f8ea27


GUACAMOLE-598: Ensure fatal error message is hidden by default, shown only when 
a fatal error has actually occurred.

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

Branch: refs/heads/master
Commit: 0cc5c3667b747d58850c0edf09f1ed9fdf76e692
Parents: 7d822df
Author: Michael Jumper 
Authored: Fri Sep 7 13:37:06 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 13:37:06 2018 -0700

--
 .../webapp/app/index/styles/fatal-page-error.css | 15 +++
 guacamole/src/main/webapp/index.html |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/0cc5c366/guacamole/src/main/webapp/app/index/styles/fatal-page-error.css
--
diff --git a/guacamole/src/main/webapp/app/index/styles/fatal-page-error.css 
b/guacamole/src/main/webapp/app/index/styles/fatal-page-error.css
index a6e28ba..9a50e9c 100644
--- a/guacamole/src/main/webapp/app/index/styles/fatal-page-error.css
+++ b/guacamole/src/main/webapp/app/index/styles/fatal-page-error.css
@@ -59,3 +59,18 @@
 margin: 0 0.25em;
 margin-bottom: -0.2em;
 }
+
+/* Ensure fatal error is initially hidden, fading the error message in when
+ * needed */
+
+.fatal-page-error-outer {
+visibility: hidden;
+opacity: 0;
+transition: opacity, visibility;
+transition-duration: 0.25s;
+}
+
+.shown.fatal-page-error-outer {
+visibility: visible;
+opacity: 1;
+}

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/0cc5c366/guacamole/src/main/webapp/index.html
--
diff --git a/guacamole/src/main/webapp/index.html 
b/guacamole/src/main/webapp/index.html
index ff920db..1d51606 100644
--- a/guacamole/src/main/webapp/index.html
+++ b/guacamole/src/main/webapp/index.html
@@ -58,7 +58,7 @@
 
 
 
-
+
 
 
 



[1/6] guacamole-client git commit: GUACAMOLE-611: Allow authentication providers to be explicitly skipped if internal errors occur.

2018-09-07 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/master 7d822df5a -> 81010a8b6


GUACAMOLE-611: Allow authentication providers to be explicitly skipped if 
internal errors occur.


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

Branch: refs/heads/master
Commit: 57831441ed4f8b285c19075d7ab7d84d6fd22812
Parents: a34bbcf
Author: Michael Jumper 
Authored: Sat Aug 25 13:19:17 2018 -0700
Committer: Michael Jumper 
Committed: Sat Aug 25 13:19:17 2018 -0700

--
 .../extension/AuthenticationProviderFacade.java | 145 +--
 .../guacamole/extension/ExtensionModule.java| 106 +-
 2 files changed, 234 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/57831441/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
index a868931..ecb0a40 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
@@ -19,14 +19,14 @@
 
 package org.apache.guacamole.extension;
 
+import java.util.Set;
 import java.util.UUID;
 import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.net.auth.AuthenticatedUser;
 import org.apache.guacamole.net.auth.AuthenticationProvider;
 import org.apache.guacamole.net.auth.Credentials;
 import org.apache.guacamole.net.auth.UserContext;
-import org.apache.guacamole.net.auth.credentials.CredentialsInfo;
-import 
org.apache.guacamole.net.auth.credentials.GuacamoleInvalidCredentialsException;
+import org.apache.guacamole.net.auth.credentials.GuacamoleCredentialsException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -49,6 +49,16 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 private final AuthenticationProvider authProvider;
 
 /**
+ * The set of identifiers of all authentication providers whose internal
+ * failures should be tolerated during the authentication process. If the
+ * identifier of this authentication provider is within this set, errors
+ * during authentication will result in the authentication provider being
+ * ignored for that authentication attempt. By default, errors during
+ * authentication halt the authentication process entirely.
+ */
+private final Set tolerateFailures;
+
+/**
  * The identifier to provide for the underlying authentication provider if
  * the authentication provider could not be loaded.
  */
@@ -63,9 +73,21 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
  *
  * @param authProviderClass
  * The AuthenticationProvider subclass to instantiate.
+ *
+ * @param tolerateFailures
+ * The set of identifiers of all authentication providers whose
+ * internal failures should be tolerated during the authentication
+ * process. If the identifier of this authentication provider is within
+ * this set, errors during authentication will result in the
+ * authentication provider being ignored for that authentication
+ * attempt. By default, errors during authentication halt the
+ * authentication process entirely.
  */
-public AuthenticationProviderFacade(Class authProviderClass) {
-authProvider = ProviderFactory.newInstance("authentication provider",
+public AuthenticationProviderFacade(
+Class authProviderClass,
+Set tolerateFailures) {
+this.tolerateFailures = tolerateFailures;
+this.authProvider = ProviderFactory.newInstance("authentication 
provider",
 authProviderClass);
 }
 
@@ -97,6 +119,41 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 
 }
 
+/**
+ * Returns whether this authentication provider should tolerate internal
+ * failures during the authentication process, allowing other
+ * authentication providers to continue operating as if this authentication
+ * provider simply is not present.
+ *
+ * @return
+ * true if this authentication provider should tolerate internal
+ * failures during the authentication process, false otherwise.
+ */
+private boolean 

[6/6] guacamole-client git commit: GUACAMOLE-611: Merge selectively fall through to other extensions when authentication fails

2018-09-07 Thread vnick
GUACAMOLE-611: Merge selectively fall through to other extensions when 
authentication fails


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

Branch: refs/heads/master
Commit: 81010a8b6e3f269946d025922d01ccae612ce7ef
Parents: 7d822df d28c4a7
Author: Nick Couchman 
Authored: Fri Sep 7 19:00:19 2018 -0400
Committer: Nick Couchman 
Committed: Fri Sep 7 19:00:19 2018 -0400

--
 .../extension/AuthenticationProviderFacade.java | 210 +--
 .../guacamole/extension/ExtensionModule.java| 106 +-
 2 files changed, 295 insertions(+), 21 deletions(-)
--




[3/6] guacamole-client git commit: GUACAMOLE-611: Advise administrator to set "skip-if-unavailable" if similar internal errors should be tolerated in the future.

2018-09-07 Thread vnick
GUACAMOLE-611: Advise administrator to set "skip-if-unavailable" if similar 
internal errors should be tolerated in the future.

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

Branch: refs/heads/master
Commit: cc742f214339fbece37f0797a8c338212dcb0b63
Parents: 8fae19d
Author: Michael Jumper 
Authored: Sat Aug 25 13:27:44 2018 -0700
Committer: Michael Jumper 
Committed: Sat Aug 25 13:45:41 2018 -0700

--
 .../extension/AuthenticationProviderFacade.java | 23 
 .../guacamole/extension/ExtensionModule.java|  2 +-
 2 files changed, 24 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cc742f21/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
index ecb0a40..3b8fd62 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
@@ -154,6 +154,25 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 
 }
 
+/**
+ * Logs a warning that the authentication process will be entirely aborted
+ * due to an internal error, advising the administrator to set the
+ * "skip-if-unavailable" property if error encountered is expected and
+ * should be tolerated.
+ */
+private void warnAuthAborted() {
+String identifier = getIdentifier();
+logger.warn("The \"{}\" authentication provider has encountered an "
++ "internal error which will halt the authentication "
++ "process. If this is unexpected or you are the developer of "
++ "this authentication provider, you may wish to enable "
++ "debug-level logging. If this is expected and you wish to "
++ "ignore such failures in the future, please set \"{}: {}\" "
++ "within your guacamole.properties.",
+identifier, ExtensionModule.SKIP_IF_UNAVAILABLE.getName(),
+identifier);
+}
+
 @Override
 public AuthenticatedUser authenticateUser(Credentials credentials)
 throws GuacamoleException {
@@ -186,6 +205,7 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 return null;
 }
 
+warnAuthAborted();
 throw e;
 
 }
@@ -198,6 +218,7 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 return null;
 }
 
+warnAuthAborted();
 throw e;
 
 }
@@ -251,6 +272,7 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 return null;
 }
 
+warnAuthAborted();
 throw e;
 
 }
@@ -263,6 +285,7 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 return null;
 }
 
+warnAuthAborted();
 throw e;
 
 }

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cc742f21/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java 
b/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
index 05bdfc1..ae8c463 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
@@ -93,7 +93,7 @@ public class ExtensionModule extends ServletModule {
  * providers that are not within this list will halt the authentication
  * process entirely.
  */
-private final StringSetProperty SKIP_IF_UNAVAILABLE = new 
StringSetProperty() {
+public static final StringSetProperty SKIP_IF_UNAVAILABLE = new 
StringSetProperty() {
 
 @Override
 public String getName() {



[4/6] guacamole-client git commit: GUACAMOLE-611: Handle sublasses of Error in addition to RuntimeException.

2018-09-07 Thread vnick
GUACAMOLE-611: Handle sublasses of Error in addition to RuntimeException.

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

Branch: refs/heads/master
Commit: 9d4aae187b71b9072764f322d25c48e11a4e1bdb
Parents: cc742f2
Author: Michael Jumper 
Authored: Sat Aug 25 13:52:41 2018 -0700
Committer: Michael Jumper 
Committed: Sat Aug 25 13:54:06 2018 -0700

--
 .../extension/AuthenticationProviderFacade.java | 26 
 1 file changed, 26 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9d4aae18/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
index 3b8fd62..2b4f99c 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
@@ -222,6 +222,19 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 throw e;
 
 }
+catch (Error e) {
+
+// Skip using this authentication provider if configured to ignore
+// internal failures during auth
+if (isFailureTolerated()) {
+warnAuthProviderSkipped(e);
+return null;
+}
+
+warnAuthAborted();
+throw e;
+
+}
 
 }
 
@@ -289,6 +302,19 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 throw e;
 
 }
+catch (Error e) {
+
+// Skip using this authentication provider if configured to ignore
+// internal failures during auth
+if (isFailureTolerated()) {
+warnAuthProviderSkipped(e);
+return null;
+}
+
+warnAuthAborted();
+throw e;
+
+}
 
 }
 



[5/6] guacamole-client git commit: GUACAMOLE-611: Update internal failure warnings to reflect the fact that an auth attempt is being ignored, not "denied".

2018-09-07 Thread vnick
GUACAMOLE-611: Update internal failure warnings to reflect the fact that an 
auth attempt is being ignored, not "denied".

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

Branch: refs/heads/master
Commit: d28c4a7cce76315f7738d8f8229cbc42f2944497
Parents: 9d4aae1
Author: Michael Jumper 
Authored: Fri Sep 7 12:36:11 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:36:11 2018 -0700

--
 .../extension/AuthenticationProviderFacade.java | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/d28c4a7c/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
index 2b4f99c..6c6474b 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/extension/AuthenticationProviderFacade.java
@@ -179,7 +179,9 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 
 // Ignore auth attempts if no auth provider could be loaded
 if (authProvider == null) {
-logger.warn("Authentication attempt denied because the 
authentication system could not be loaded. Please check for errors earlier in 
the logs.");
+logger.warn("Authentication attempt ignored because the relevant "
++ "authentication provider could not be loaded. Please "
++ "check for errors earlier in the logs.");
 return null;
 }
 
@@ -244,7 +246,9 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 
 // Ignore auth attempts if no auth provider could be loaded
 if (authProvider == null) {
-logger.warn("Reauthentication attempt denied because the 
authentication system could not be loaded. Please check for errors earlier in 
the logs.");
+logger.warn("Reauthentication attempt ignored because the relevant 
"
++ "authentication provider could not be loaded. Please "
++ "check for errors earlier in the logs.");
 return null;
 }
 
@@ -259,7 +263,9 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 
 // Ignore auth attempts if no auth provider could be loaded
 if (authProvider == null) {
-logger.warn("User data retrieval attempt denied because the 
authentication system could not be loaded. Please check for errors earlier in 
the logs.");
+logger.warn("User data retrieval attempt ignored because the "
++ "relevant authentication provider could not be loaded. "
++ "Please check for errors earlier in the logs.");
 return null;
 }
 
@@ -325,7 +331,9 @@ public class AuthenticationProviderFacade implements 
AuthenticationProvider {
 
 // Ignore auth attempts if no auth provider could be loaded
 if (authProvider == null) {
-logger.warn("User data refresh attempt denied because the 
authentication system could not be loaded. Please check for errors earlier in 
the logs.");
+logger.warn("User data refresh attempt ignored because the "
++ "relevant authentication provider could not be loaded. "
++ "Please check for errors earlier in the logs.");
 return null;
 }
 



[2/6] guacamole-client git commit: GUACAMOLE-611: Rename property defining tolerated auth providers to "skip-if-unavailable".

2018-09-07 Thread vnick
GUACAMOLE-611: Rename property defining tolerated auth providers to 
"skip-if-unavailable".


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

Branch: refs/heads/master
Commit: 8fae19dee9ba052cbbb5acbca7250ff605a4dd9f
Parents: 5783144
Author: Michael Jumper 
Authored: Sat Aug 25 13:20:38 2018 -0700
Committer: Michael Jumper 
Committed: Sat Aug 25 13:20:38 2018 -0700

--
 .../org/apache/guacamole/extension/ExtensionModule.java   | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/8fae19de/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java 
b/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
index c276cc1..05bdfc1 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
@@ -93,11 +93,11 @@ public class ExtensionModule extends ServletModule {
  * providers that are not within this list will halt the authentication
  * process entirely.
  */
-private final StringSetProperty TOLERATE_INTERNAL_FAILURES = new 
StringSetProperty() {
+private final StringSetProperty SKIP_IF_UNAVAILABLE = new 
StringSetProperty() {
 
 @Override
 public String getName() {
-return "tolerate-internal-failures";
+return "skip-if-unavailable";
 }
 
 };
@@ -379,13 +379,13 @@ public class ExtensionModule extends ServletModule {
 // Parse list of auth providers whose internal failures should be
 // tolerated
 try {
-return environment.getProperty(TOLERATE_INTERNAL_FAILURES, 
Collections.emptySet());
+return environment.getProperty(SKIP_IF_UNAVAILABLE, 
Collections.emptySet());
 }
 
 // Use empty set by default if property cannot be parsed
 catch (GuacamoleException e) {
-logger.warn("The list of authentication providers specified via 
the \"{}\" property could not be parsed: {}", 
TOLERATE_INTERNAL_FAILURES.getName(), e.getMessage());
-logger.debug("Unable to parse \"{}\" property.", 
TOLERATE_INTERNAL_FAILURES.getName(), e);
+logger.warn("The list of authentication providers specified via 
the \"{}\" property could not be parsed: {}", SKIP_IF_UNAVAILABLE.getName(), 
e.getMessage());
+logger.debug("Unable to parse \"{}\" property.", 
SKIP_IF_UNAVAILABLE.getName(), e);
 return Collections.emptySet();
 }
 



[3/6] guacamole-client git commit: GUACAMOLE-567: Move client instability state to own flag. Actual current connection state is lost otherwise.

2018-09-07 Thread vnick
GUACAMOLE-567: Move client instability state to own flag. Actual current 
connection state is lost otherwise.


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

Branch: refs/heads/staging/1.0.0
Commit: fe07cf9b703e2aa9a83ed5ce57e51fe6cb33105d
Parents: 402ddb5
Author: Michael Jumper 
Authored: Sat Sep 1 19:19:08 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../app/client/controllers/clientController.js  |  2 +-
 .../webapp/app/client/types/ManagedClient.js|  8 ++--
 .../app/client/types/ManagedClientState.js  | 40 +++-
 3 files changed, 34 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fe07cf9b/guacamole/src/main/webapp/app/client/controllers/clientController.js
--
diff --git 
a/guacamole/src/main/webapp/app/client/controllers/clientController.js 
b/guacamole/src/main/webapp/app/client/controllers/clientController.js
index ffbe3c5..41c6ba6 100644
--- a/guacamole/src/main/webapp/app/client/controllers/clientController.js
+++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js
@@ -635,7 +635,7 @@ angular.module('client').controller('clientController', 
['$scope', '$routeParams
  * otherwise.
  */
 $scope.isConnectionUnstable = function isConnectionUnstable() {
-return $scope.client && $scope.client.clientState.connectionState === 
ManagedClientState.ConnectionState.UNSTABLE;
+return $scope.client && $scope.client.clientState.tunnelUnstable;
 };
 
 // Show status dialog when connection status changes

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fe07cf9b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
--
diff --git a/guacamole/src/main/webapp/app/client/types/ManagedClient.js 
b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
index 09c96a9..a9bc3be 100644
--- a/guacamole/src/main/webapp/app/client/types/ManagedClient.js
+++ b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
@@ -346,16 +346,14 @@ angular.module('client').factory('ManagedClient', 
['$rootScope', '$injector',
 ManagedClientState.ConnectionState.CONNECTING);
 break;
 
-// Connection is established
+// Connection is established / no longer unstable
 case Guacamole.Tunnel.State.OPEN:
-
ManagedClientState.setConnectionState(managedClient.clientState,
-ManagedClientState.ConnectionState.CONNECTED);
+
ManagedClientState.setTunnelUnstable(managedClient.clientState, false);
 break;
 
 // Connection is established but misbehaving
 case Guacamole.Tunnel.State.UNSTABLE:
-
ManagedClientState.setConnectionState(managedClient.clientState,
-ManagedClientState.ConnectionState.UNSTABLE);
+
ManagedClientState.setTunnelUnstable(managedClient.clientState, true);
 break;
 
 // Connection has closed

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fe07cf9b/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
--
diff --git a/guacamole/src/main/webapp/app/client/types/ManagedClientState.js 
b/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
index 1a26b0d..10f71b4 100644
--- a/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
+++ b/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
@@ -46,6 +46,16 @@ angular.module('client').factory('ManagedClientState', 
[function defineManagedCl
 this.connectionState = template.connectionState || 
ManagedClientState.ConnectionState.IDLE;
 
 /**
+ * Whether the network connection used by the tunnel seems unstable. If
+ * the network connection is unstable, the remote desktop connection
+ * may perform poorly or disconnect.
+ *
+ * @type Boolean
+ * @default false
+ */
+this.tunnelUnstable = template.tunnelUnstable || false;
+
+/**
  * The status code of the current error condition, if connectionState
  * is CLIENT_ERROR or TUNNEL_ERROR. For all other connectionState
  * values, this will be 

[4/6] guacamole-client git commit: GUACAMOLE-567: Add tunnel isConnected() function. Consider both OPEN and UNSTABLE status as connected.

2018-09-07 Thread vnick
GUACAMOLE-567: Add tunnel isConnected() function. Consider both OPEN and 
UNSTABLE status as connected.


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

Branch: refs/heads/staging/1.0.0
Commit: 5825835237fbd3307f7da09b3958d4f458fe8598
Parents: fe07cf9
Author: Michael Jumper 
Authored: Sat Sep 1 21:12:10 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../src/main/webapp/modules/Tunnel.js   | 21 +++-
 1 file changed, 16 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/58258352/guacamole-common-js/src/main/webapp/modules/Tunnel.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js 
b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
index 52bd20a..06cc741 100644
--- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js
+++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
@@ -74,6 +74,17 @@ Guacamole.Tunnel = function() {
 };
 
 /**
+ * Returns whether this tunnel is currently connected.
+ *
+ * @returns {Boolean}
+ * true if this tunnel is currently connected, false otherwise.
+ */
+this.isConnected = function isConnected() {
+return this.state === Guacamole.Tunnel.State.OPEN
+|| this.state === Guacamole.Tunnel.State.UNSTABLE;
+};
+
+/**
  * The current state of this tunnel.
  * 
  * @type {Number}
@@ -342,7 +353,7 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 this.sendMessage = function() {
 
 // Do not attempt to send messages if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN)
+if (!tunnel.isConnected())
 return;
 
 // Do not attempt to send empty messages
@@ -384,7 +395,7 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 function sendPendingMessages() {
 
 // Do not attempt to send messages if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN)
+if (!tunnel.isConnected())
 return;
 
 if (outputMessageBuffer.length > 0) {
@@ -462,7 +473,7 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 function parseResponse() {
 
 // Do not handle responses if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN) {
+if (!tunnel.isConnected()) {
 
 // Clean up interval if polling
 if (interval !== null)
@@ -835,7 +846,7 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 this.sendMessage = function(elements) {
 
 // Do not attempt to send messages if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN)
+if (!tunnel.isConnected())
 return;
 
 // Do not attempt to send empty messages
@@ -945,7 +956,7 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 var opcode = elements.shift();
 
 // Update state and UUID when first instruction received
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN) {
+if (tunnel.state === Guacamole.Tunnel.State.CONNECTING) {
 
 // Associate tunnel UUID if received
 if (opcode === Guacamole.Tunnel.INTERNAL_DATA_OPCODE)



[5/6] guacamole-client git commit: GUACAMOLE-567: Use ping messages specific to the WebSocket tunnel to test connection stability independently of the underlying Guacamole connection.

2018-09-07 Thread vnick
GUACAMOLE-567: Use ping messages specific to the WebSocket tunnel to test 
connection stability independently of the underlying Guacamole connection.


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

Branch: refs/heads/staging/1.0.0
Commit: ea0b33bee19123489684549f31c36356fe39c728
Parents: 5825835
Author: Michael Jumper 
Authored: Thu Sep 6 19:48:33 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../src/main/webapp/modules/Tunnel.js   |  32 -
 .../GuacamoleWebSocketTunnelEndpoint.java   | 121 +--
 2 files changed, 141 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ea0b33be/guacamole-common-js/src/main/webapp/modules/Tunnel.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js 
b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
index 06cc741..827dd6c 100644
--- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js
+++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
@@ -153,7 +153,8 @@ Guacamole.Tunnel = function() {
  * use by tunnel implementations. The value of this opcode is guaranteed to be
  * the empty string (""). Tunnel implementations may use this opcode for any
  * purpose. It is currently used by the HTTP tunnel to mark the end of the HTTP
- * response, and by the WebSocket tunnel to transmit the tunnel UUID.
+ * response, and by the WebSocket tunnel to transmit the tunnel UUID and send
+ * connection stability test pings/responses.
  *
  * @constant
  * @type {String}
@@ -743,6 +744,15 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 var unstableTimeout = null;
 
 /**
+ * The current connection stability test ping interval ID, if any. This
+ * will only be set upon successful connection.
+ *
+ * @private
+ * @type {Number}
+ */
+var pingInterval = null;
+
+/**
  * The WebSocket protocol corresponding to the protocol used for the 
current
  * location.
  * @private
@@ -752,6 +762,16 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 "https:": "wss:"
 };
 
+/**
+ * The number of milliseconds to wait between connection stability test
+ * pings.
+ *
+ * @private
+ * @constant
+ * @type {Number}
+ */
+var PING_FREQUENCY = 500;
+
 // Transform current URL to WebSocket URL
 
 // If not already a websocket URL
@@ -828,6 +848,9 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 window.clearTimeout(receive_timeout);
 window.clearTimeout(unstableTimeout);
 
+// Cease connection test pings
+window.clearInterval(pingInterval);
+
 // Ignore if already closed
 if (tunnel.state === Guacamole.Tunnel.State.CLOSED)
 return;
@@ -892,6 +915,13 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 
 socket.onopen = function(event) {
 reset_timeout();
+
+// Ping tunnel endpoint regularly to test connection stability
+pingInterval = setInterval(function sendPing() {
+tunnel.sendMessage(Guacamole.Tunnel.INTERNAL_DATA_OPCODE,
+"ping", new Date().getTime());
+}, PING_FREQUENCY);
+
 };
 
 socket.onclose = function(event) {

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ea0b33be/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
--
diff --git 
a/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
 
b/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
index 0e02622..772ce64 100644
--- 
a/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
+++ 
b/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
@@ -20,6 +20,7 @@
 package org.apache.guacamole.websocket;
 
 import java.io.IOException;
+import java.util.List;
 import javax.websocket.CloseReason;
 import javax.websocket.CloseReason.CloseCode;
 import javax.websocket.Endpoint;
@@ -36,6 +37,8 @@ import org.apache.guacamole.io.GuacamoleWriter;
 import org.apache.guacamole.net.GuacamoleTunnel;
 import org.apache.guacamole.GuacamoleClientException;
 import org.apache.guacamole.GuacamoleConnectionClosedException;
+import org.apache.guacamole.protocol.FilteredGuacamoleWriter;

[2/6] guacamole-client git commit: GUACAMOLE-567: Add support for WebSocket-specific ping messages to the legacy WebSocket tunnel implementations.

2018-09-07 Thread vnick
GUACAMOLE-567: Add support for WebSocket-specific ping messages to the legacy 
WebSocket tunnel implementations.


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

Branch: refs/heads/staging/1.0.0
Commit: 819d3178343a84af6926d862dc9cf584f9aa80f1
Parents: ea0b33b
Author: Michael Jumper 
Authored: Thu Sep 6 19:49:02 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../jetty8/GuacamoleWebSocketTunnelServlet.java | 111 -
 .../GuacamoleWebSocketTunnelListener.java   | 121 +--
 .../tomcat/GuacamoleWebSocketTunnelServlet.java | 110 -
 3 files changed, 323 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/819d3178/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
 
b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
index e5c5db9..304e1dd 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
@@ -20,6 +20,7 @@
 package org.apache.guacamole.tunnel.websocket.jetty8;
 
 import java.io.IOException;
+import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.io.GuacamoleReader;
@@ -30,6 +31,8 @@ import org.eclipse.jetty.websocket.WebSocket.Connection;
 import org.eclipse.jetty.websocket.WebSocketServlet;
 import org.apache.guacamole.GuacamoleClientException;
 import org.apache.guacamole.GuacamoleConnectionClosedException;
+import org.apache.guacamole.protocol.FilteredGuacamoleWriter;
+import org.apache.guacamole.protocol.GuacamoleFilter;
 import org.apache.guacamole.protocol.GuacamoleInstruction;
 import org.apache.guacamole.tunnel.http.HTTPTunnelRequest;
 import org.apache.guacamole.tunnel.TunnelRequest;
@@ -53,6 +56,15 @@ public abstract class GuacamoleWebSocketTunnelServlet 
extends WebSocketServlet {
 private static final int BUFFER_SIZE = 8192;
 
 /**
+ * The opcode of the instruction used to indicate a connection stability
+ * test ping request or response. Note that this instruction is
+ * encapsulated within an internal tunnel instruction (with the opcode
+ * being the empty string), thus this will actually be the value of the
+ * first element of the received instruction.
+ */
+private static final String PING_OPCODE = "ping";
+
+/**
  * Sends the given numeric Guacamole and WebSocket status
  * on the given WebSocket connection and closes the
  * connection.
@@ -106,6 +118,58 @@ public abstract class GuacamoleWebSocketTunnelServlet 
extends WebSocketServlet {
  */
 private GuacamoleTunnel tunnel = null;
 
+/**
+ * The active WebSocket connection. This value will always be
+ * non-null if tunnel is non-null.
+ */
+private Connection connection = null;
+
+/**
+ * Sends a Guacamole instruction along the outbound WebSocket
+ * connection to the connected Guacamole client. If an instruction
+ * is already in the process of being sent by another thread, this
+ * function will block until in-progress instructions are complete.
+ *
+ * @param instruction
+ * The instruction to send.
+ *
+ * @throws IOException
+ * If an I/O error occurs preventing the given instruction from
+ * being sent.
+ */
+private void sendInstruction(String instruction)
+throws IOException {
+
+// NOTE: Synchronization on the non-final remote field here is
+// intentional. The outbound websocket connection is only
+// sensitive to simultaneous attempts to send messages with
+// respect to itself. If the connection changes, then
+// synchronization need only be performed in context of the new
+// connection
+synchronized (connection) {
+connection.sendMessage(instruction);
+}
+
+}
+
+ 

[1/6] guacamole-client git commit: GUACAMOLE-567: Regularly test connection stability of HTTP tunnel.

2018-09-07 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/staging/1.0.0 402ddb577 -> 764006534


GUACAMOLE-567: Regularly test connection stability of HTTP tunnel.

Unlike the WebSocket tunnel, where a manual ping request/response must
be explicitly implemented, we can rely on HTTP's own request/response
to verify stability.

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

Branch: refs/heads/staging/1.0.0
Commit: 34bab9524eb6d1b5e3fa96be7ed2602d71f25dd9
Parents: 819d317
Author: Michael Jumper 
Authored: Thu Sep 6 19:57:29 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../src/main/webapp/modules/Tunnel.js   | 29 
 1 file changed, 29 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/34bab952/guacamole-common-js/src/main/webapp/modules/Tunnel.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js 
b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
index 827dd6c..24ffaa8 100644
--- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js
+++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
@@ -259,6 +259,25 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 var unstableTimeout = null;
 
 /**
+ * The current connection stability test ping interval ID, if any. This
+ * will only be set upon successful connection.
+ *
+ * @private
+ * @type {Number}
+ */
+var pingInterval = null;
+
+/**
+ * The number of milliseconds to wait between connection stability test
+ * pings.
+ *
+ * @private
+ * @constant
+ * @type {Number}
+ */
+var PING_FREQUENCY = 500;
+
+/**
  * Additional headers to be sent in tunnel requests. This dictionary can be
  * populated with key/value header pairs to pass information such as 
authentication
  * tokens, etc.
@@ -327,6 +346,9 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 window.clearTimeout(receive_timeout);
 window.clearTimeout(unstableTimeout);
 
+// Cease connection test pings
+window.clearInterval(pingInterval);
+
 // Ignore if already closed
 if (tunnel.state === Guacamole.Tunnel.State.CLOSED)
 return;
@@ -413,6 +435,8 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 message_xmlhttprequest.onreadystatechange = function() {
 if (message_xmlhttprequest.readyState === 4) {
 
+reset_timeout();
+
 // If an error occurs during send, handle it
 if (message_xmlhttprequest.status !== 200)
 handleHTTPTunnelError(message_xmlhttprequest);
@@ -687,6 +711,11 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 // Mark as open
 tunnel.setState(Guacamole.Tunnel.State.OPEN);
 
+// Ping tunnel endpoint regularly to test connection stability
+pingInterval = setInterval(function sendPing() {
+tunnel.sendMessage("nop");
+}, PING_FREQUENCY);
+
 // Start reading data
 handleResponse(makeRequest());
 



[6/6] guacamole-client git commit: GUACAMOLE-567: Merge add specific connection stability test to tunnel implementations.

2018-09-07 Thread vnick
GUACAMOLE-567: Merge add specific connection stability test to tunnel 
implementations.


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

Branch: refs/heads/staging/1.0.0
Commit: 7640065345cca573300a6e133c9374b6840267e2
Parents: 402ddb5 34bab95
Author: Nick Couchman 
Authored: Fri Sep 7 19:03:49 2018 -0400
Committer: Nick Couchman 
Committed: Fri Sep 7 19:03:49 2018 -0400

--
 .../src/main/webapp/modules/Tunnel.js   |  82 -
 .../GuacamoleWebSocketTunnelEndpoint.java   | 121 +--
 .../jetty8/GuacamoleWebSocketTunnelServlet.java | 111 -
 .../GuacamoleWebSocketTunnelListener.java   | 121 +--
 .../tomcat/GuacamoleWebSocketTunnelServlet.java | 110 -
 .../app/client/controllers/clientController.js  |   2 +-
 .../webapp/app/client/types/ManagedClient.js|   8 +-
 .../app/client/types/ManagedClientState.js  |  40 --
 8 files changed, 543 insertions(+), 52 deletions(-)
--




[2/2] guacamole-client git commit: GUACAMOLE-598: Merge show fatal error message only after a fatal error has occurred.

2018-09-07 Thread vnick
GUACAMOLE-598: Merge show fatal error message only after a fatal error has 
occurred.


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

Branch: refs/heads/master
Commit: af0f8ea27ff8c33c7f25ffc1f56b9af09f6be56f
Parents: 0484a4e 0cc5c36
Author: Nick Couchman 
Authored: Fri Sep 7 19:09:38 2018 -0400
Committer: Nick Couchman 
Committed: Fri Sep 7 19:09:38 2018 -0400

--
 .../webapp/app/index/styles/fatal-page-error.css | 15 +++
 guacamole/src/main/webapp/index.html |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)
--




[3/7] guacamole-client git commit: GUACAMOLE-567: Move client instability state to own flag. Actual current connection state is lost otherwise.

2018-09-07 Thread vnick
GUACAMOLE-567: Move client instability state to own flag. Actual current 
connection state is lost otherwise.


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

Branch: refs/heads/master
Commit: fe07cf9b703e2aa9a83ed5ce57e51fe6cb33105d
Parents: 402ddb5
Author: Michael Jumper 
Authored: Sat Sep 1 19:19:08 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../app/client/controllers/clientController.js  |  2 +-
 .../webapp/app/client/types/ManagedClient.js|  8 ++--
 .../app/client/types/ManagedClientState.js  | 40 +++-
 3 files changed, 34 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fe07cf9b/guacamole/src/main/webapp/app/client/controllers/clientController.js
--
diff --git 
a/guacamole/src/main/webapp/app/client/controllers/clientController.js 
b/guacamole/src/main/webapp/app/client/controllers/clientController.js
index ffbe3c5..41c6ba6 100644
--- a/guacamole/src/main/webapp/app/client/controllers/clientController.js
+++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js
@@ -635,7 +635,7 @@ angular.module('client').controller('clientController', 
['$scope', '$routeParams
  * otherwise.
  */
 $scope.isConnectionUnstable = function isConnectionUnstable() {
-return $scope.client && $scope.client.clientState.connectionState === 
ManagedClientState.ConnectionState.UNSTABLE;
+return $scope.client && $scope.client.clientState.tunnelUnstable;
 };
 
 // Show status dialog when connection status changes

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fe07cf9b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
--
diff --git a/guacamole/src/main/webapp/app/client/types/ManagedClient.js 
b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
index 09c96a9..a9bc3be 100644
--- a/guacamole/src/main/webapp/app/client/types/ManagedClient.js
+++ b/guacamole/src/main/webapp/app/client/types/ManagedClient.js
@@ -346,16 +346,14 @@ angular.module('client').factory('ManagedClient', 
['$rootScope', '$injector',
 ManagedClientState.ConnectionState.CONNECTING);
 break;
 
-// Connection is established
+// Connection is established / no longer unstable
 case Guacamole.Tunnel.State.OPEN:
-
ManagedClientState.setConnectionState(managedClient.clientState,
-ManagedClientState.ConnectionState.CONNECTED);
+
ManagedClientState.setTunnelUnstable(managedClient.clientState, false);
 break;
 
 // Connection is established but misbehaving
 case Guacamole.Tunnel.State.UNSTABLE:
-
ManagedClientState.setConnectionState(managedClient.clientState,
-ManagedClientState.ConnectionState.UNSTABLE);
+
ManagedClientState.setTunnelUnstable(managedClient.clientState, true);
 break;
 
 // Connection has closed

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fe07cf9b/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
--
diff --git a/guacamole/src/main/webapp/app/client/types/ManagedClientState.js 
b/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
index 1a26b0d..10f71b4 100644
--- a/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
+++ b/guacamole/src/main/webapp/app/client/types/ManagedClientState.js
@@ -46,6 +46,16 @@ angular.module('client').factory('ManagedClientState', 
[function defineManagedCl
 this.connectionState = template.connectionState || 
ManagedClientState.ConnectionState.IDLE;
 
 /**
+ * Whether the network connection used by the tunnel seems unstable. If
+ * the network connection is unstable, the remote desktop connection
+ * may perform poorly or disconnect.
+ *
+ * @type Boolean
+ * @default false
+ */
+this.tunnelUnstable = template.tunnelUnstable || false;
+
+/**
  * The status code of the current error condition, if connectionState
  * is CLIENT_ERROR or TUNNEL_ERROR. For all other connectionState
  * values, this will be 

[4/7] guacamole-client git commit: GUACAMOLE-567: Add support for WebSocket-specific ping messages to the legacy WebSocket tunnel implementations.

2018-09-07 Thread vnick
GUACAMOLE-567: Add support for WebSocket-specific ping messages to the legacy 
WebSocket tunnel implementations.


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

Branch: refs/heads/master
Commit: 819d3178343a84af6926d862dc9cf584f9aa80f1
Parents: ea0b33b
Author: Michael Jumper 
Authored: Thu Sep 6 19:49:02 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../jetty8/GuacamoleWebSocketTunnelServlet.java | 111 -
 .../GuacamoleWebSocketTunnelListener.java   | 121 +--
 .../tomcat/GuacamoleWebSocketTunnelServlet.java | 110 -
 3 files changed, 323 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/819d3178/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
--
diff --git 
a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
 
b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
index e5c5db9..304e1dd 100644
--- 
a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
+++ 
b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java
@@ -20,6 +20,7 @@
 package org.apache.guacamole.tunnel.websocket.jetty8;
 
 import java.io.IOException;
+import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import org.apache.guacamole.GuacamoleException;
 import org.apache.guacamole.io.GuacamoleReader;
@@ -30,6 +31,8 @@ import org.eclipse.jetty.websocket.WebSocket.Connection;
 import org.eclipse.jetty.websocket.WebSocketServlet;
 import org.apache.guacamole.GuacamoleClientException;
 import org.apache.guacamole.GuacamoleConnectionClosedException;
+import org.apache.guacamole.protocol.FilteredGuacamoleWriter;
+import org.apache.guacamole.protocol.GuacamoleFilter;
 import org.apache.guacamole.protocol.GuacamoleInstruction;
 import org.apache.guacamole.tunnel.http.HTTPTunnelRequest;
 import org.apache.guacamole.tunnel.TunnelRequest;
@@ -53,6 +56,15 @@ public abstract class GuacamoleWebSocketTunnelServlet 
extends WebSocketServlet {
 private static final int BUFFER_SIZE = 8192;
 
 /**
+ * The opcode of the instruction used to indicate a connection stability
+ * test ping request or response. Note that this instruction is
+ * encapsulated within an internal tunnel instruction (with the opcode
+ * being the empty string), thus this will actually be the value of the
+ * first element of the received instruction.
+ */
+private static final String PING_OPCODE = "ping";
+
+/**
  * Sends the given numeric Guacamole and WebSocket status
  * on the given WebSocket connection and closes the
  * connection.
@@ -106,6 +118,58 @@ public abstract class GuacamoleWebSocketTunnelServlet 
extends WebSocketServlet {
  */
 private GuacamoleTunnel tunnel = null;
 
+/**
+ * The active WebSocket connection. This value will always be
+ * non-null if tunnel is non-null.
+ */
+private Connection connection = null;
+
+/**
+ * Sends a Guacamole instruction along the outbound WebSocket
+ * connection to the connected Guacamole client. If an instruction
+ * is already in the process of being sent by another thread, this
+ * function will block until in-progress instructions are complete.
+ *
+ * @param instruction
+ * The instruction to send.
+ *
+ * @throws IOException
+ * If an I/O error occurs preventing the given instruction from
+ * being sent.
+ */
+private void sendInstruction(String instruction)
+throws IOException {
+
+// NOTE: Synchronization on the non-final remote field here is
+// intentional. The outbound websocket connection is only
+// sensitive to simultaneous attempts to send messages with
+// respect to itself. If the connection changes, then
+// synchronization need only be performed in context of the new
+// connection
+synchronized (connection) {
+connection.sendMessage(instruction);
+}
+
+}
+
+

[7/7] guacamole-client git commit: Merge 1.0.0 changes back to master.

2018-09-07 Thread vnick
Merge 1.0.0 changes back to master.


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

Branch: refs/heads/master
Commit: 0484a4e485904625d924b796145ff341523677cd
Parents: 81010a8 7640065
Author: Nick Couchman 
Authored: Fri Sep 7 19:06:20 2018 -0400
Committer: Nick Couchman 
Committed: Fri Sep 7 19:06:20 2018 -0400

--
 .../src/main/webapp/modules/Tunnel.js   |  82 -
 .../GuacamoleWebSocketTunnelEndpoint.java   | 121 +--
 .../jetty8/GuacamoleWebSocketTunnelServlet.java | 111 -
 .../GuacamoleWebSocketTunnelListener.java   | 121 +--
 .../tomcat/GuacamoleWebSocketTunnelServlet.java | 110 -
 .../app/client/controllers/clientController.js  |   2 +-
 .../webapp/app/client/types/ManagedClient.js|   8 +-
 .../app/client/types/ManagedClientState.js  |  40 --
 8 files changed, 543 insertions(+), 52 deletions(-)
--




[1/7] guacamole-client git commit: GUACAMOLE-567: Regularly test connection stability of HTTP tunnel.

2018-09-07 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/master 81010a8b6 -> 0484a4e48


GUACAMOLE-567: Regularly test connection stability of HTTP tunnel.

Unlike the WebSocket tunnel, where a manual ping request/response must
be explicitly implemented, we can rely on HTTP's own request/response
to verify stability.

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

Branch: refs/heads/master
Commit: 34bab9524eb6d1b5e3fa96be7ed2602d71f25dd9
Parents: 819d317
Author: Michael Jumper 
Authored: Thu Sep 6 19:57:29 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../src/main/webapp/modules/Tunnel.js   | 29 
 1 file changed, 29 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/34bab952/guacamole-common-js/src/main/webapp/modules/Tunnel.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js 
b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
index 827dd6c..24ffaa8 100644
--- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js
+++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
@@ -259,6 +259,25 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 var unstableTimeout = null;
 
 /**
+ * The current connection stability test ping interval ID, if any. This
+ * will only be set upon successful connection.
+ *
+ * @private
+ * @type {Number}
+ */
+var pingInterval = null;
+
+/**
+ * The number of milliseconds to wait between connection stability test
+ * pings.
+ *
+ * @private
+ * @constant
+ * @type {Number}
+ */
+var PING_FREQUENCY = 500;
+
+/**
  * Additional headers to be sent in tunnel requests. This dictionary can be
  * populated with key/value header pairs to pass information such as 
authentication
  * tokens, etc.
@@ -327,6 +346,9 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 window.clearTimeout(receive_timeout);
 window.clearTimeout(unstableTimeout);
 
+// Cease connection test pings
+window.clearInterval(pingInterval);
+
 // Ignore if already closed
 if (tunnel.state === Guacamole.Tunnel.State.CLOSED)
 return;
@@ -413,6 +435,8 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 message_xmlhttprequest.onreadystatechange = function() {
 if (message_xmlhttprequest.readyState === 4) {
 
+reset_timeout();
+
 // If an error occurs during send, handle it
 if (message_xmlhttprequest.status !== 200)
 handleHTTPTunnelError(message_xmlhttprequest);
@@ -687,6 +711,11 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 // Mark as open
 tunnel.setState(Guacamole.Tunnel.State.OPEN);
 
+// Ping tunnel endpoint regularly to test connection stability
+pingInterval = setInterval(function sendPing() {
+tunnel.sendMessage("nop");
+}, PING_FREQUENCY);
+
 // Start reading data
 handleResponse(makeRequest());
 



[2/7] guacamole-client git commit: GUACAMOLE-567: Add tunnel isConnected() function. Consider both OPEN and UNSTABLE status as connected.

2018-09-07 Thread vnick
GUACAMOLE-567: Add tunnel isConnected() function. Consider both OPEN and 
UNSTABLE status as connected.


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

Branch: refs/heads/master
Commit: 5825835237fbd3307f7da09b3958d4f458fe8598
Parents: fe07cf9
Author: Michael Jumper 
Authored: Sat Sep 1 21:12:10 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../src/main/webapp/modules/Tunnel.js   | 21 +++-
 1 file changed, 16 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/58258352/guacamole-common-js/src/main/webapp/modules/Tunnel.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js 
b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
index 52bd20a..06cc741 100644
--- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js
+++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
@@ -74,6 +74,17 @@ Guacamole.Tunnel = function() {
 };
 
 /**
+ * Returns whether this tunnel is currently connected.
+ *
+ * @returns {Boolean}
+ * true if this tunnel is currently connected, false otherwise.
+ */
+this.isConnected = function isConnected() {
+return this.state === Guacamole.Tunnel.State.OPEN
+|| this.state === Guacamole.Tunnel.State.UNSTABLE;
+};
+
+/**
  * The current state of this tunnel.
  * 
  * @type {Number}
@@ -342,7 +353,7 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 this.sendMessage = function() {
 
 // Do not attempt to send messages if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN)
+if (!tunnel.isConnected())
 return;
 
 // Do not attempt to send empty messages
@@ -384,7 +395,7 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 function sendPendingMessages() {
 
 // Do not attempt to send messages if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN)
+if (!tunnel.isConnected())
 return;
 
 if (outputMessageBuffer.length > 0) {
@@ -462,7 +473,7 @@ Guacamole.HTTPTunnel = function(tunnelURL, crossDomain, 
extraTunnelHeaders) {
 function parseResponse() {
 
 // Do not handle responses if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN) {
+if (!tunnel.isConnected()) {
 
 // Clean up interval if polling
 if (interval !== null)
@@ -835,7 +846,7 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 this.sendMessage = function(elements) {
 
 // Do not attempt to send messages if not connected
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN)
+if (!tunnel.isConnected())
 return;
 
 // Do not attempt to send empty messages
@@ -945,7 +956,7 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 var opcode = elements.shift();
 
 // Update state and UUID when first instruction received
-if (tunnel.state !== Guacamole.Tunnel.State.OPEN) {
+if (tunnel.state === Guacamole.Tunnel.State.CONNECTING) {
 
 // Associate tunnel UUID if received
 if (opcode === Guacamole.Tunnel.INTERNAL_DATA_OPCODE)



[5/7] guacamole-client git commit: GUACAMOLE-567: Use ping messages specific to the WebSocket tunnel to test connection stability independently of the underlying Guacamole connection.

2018-09-07 Thread vnick
GUACAMOLE-567: Use ping messages specific to the WebSocket tunnel to test 
connection stability independently of the underlying Guacamole connection.


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

Branch: refs/heads/master
Commit: ea0b33bee19123489684549f31c36356fe39c728
Parents: 5825835
Author: Michael Jumper 
Authored: Thu Sep 6 19:48:33 2018 -0700
Committer: Michael Jumper 
Committed: Fri Sep 7 12:20:28 2018 -0700

--
 .../src/main/webapp/modules/Tunnel.js   |  32 -
 .../GuacamoleWebSocketTunnelEndpoint.java   | 121 +--
 2 files changed, 141 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ea0b33be/guacamole-common-js/src/main/webapp/modules/Tunnel.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js 
b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
index 06cc741..827dd6c 100644
--- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js
+++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js
@@ -153,7 +153,8 @@ Guacamole.Tunnel = function() {
  * use by tunnel implementations. The value of this opcode is guaranteed to be
  * the empty string (""). Tunnel implementations may use this opcode for any
  * purpose. It is currently used by the HTTP tunnel to mark the end of the HTTP
- * response, and by the WebSocket tunnel to transmit the tunnel UUID.
+ * response, and by the WebSocket tunnel to transmit the tunnel UUID and send
+ * connection stability test pings/responses.
  *
  * @constant
  * @type {String}
@@ -743,6 +744,15 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 var unstableTimeout = null;
 
 /**
+ * The current connection stability test ping interval ID, if any. This
+ * will only be set upon successful connection.
+ *
+ * @private
+ * @type {Number}
+ */
+var pingInterval = null;
+
+/**
  * The WebSocket protocol corresponding to the protocol used for the 
current
  * location.
  * @private
@@ -752,6 +762,16 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 "https:": "wss:"
 };
 
+/**
+ * The number of milliseconds to wait between connection stability test
+ * pings.
+ *
+ * @private
+ * @constant
+ * @type {Number}
+ */
+var PING_FREQUENCY = 500;
+
 // Transform current URL to WebSocket URL
 
 // If not already a websocket URL
@@ -828,6 +848,9 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 window.clearTimeout(receive_timeout);
 window.clearTimeout(unstableTimeout);
 
+// Cease connection test pings
+window.clearInterval(pingInterval);
+
 // Ignore if already closed
 if (tunnel.state === Guacamole.Tunnel.State.CLOSED)
 return;
@@ -892,6 +915,13 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 
 socket.onopen = function(event) {
 reset_timeout();
+
+// Ping tunnel endpoint regularly to test connection stability
+pingInterval = setInterval(function sendPing() {
+tunnel.sendMessage(Guacamole.Tunnel.INTERNAL_DATA_OPCODE,
+"ping", new Date().getTime());
+}, PING_FREQUENCY);
+
 };
 
 socket.onclose = function(event) {

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/ea0b33be/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
--
diff --git 
a/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
 
b/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
index 0e02622..772ce64 100644
--- 
a/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
+++ 
b/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java
@@ -20,6 +20,7 @@
 package org.apache.guacamole.websocket;
 
 import java.io.IOException;
+import java.util.List;
 import javax.websocket.CloseReason;
 import javax.websocket.CloseReason.CloseCode;
 import javax.websocket.Endpoint;
@@ -36,6 +37,8 @@ import org.apache.guacamole.io.GuacamoleWriter;
 import org.apache.guacamole.net.GuacamoleTunnel;
 import org.apache.guacamole.GuacamoleClientException;
 import org.apache.guacamole.GuacamoleConnectionClosedException;
+import org.apache.guacamole.protocol.FilteredGuacamoleWriter;
+import 

[6/7] guacamole-client git commit: GUACAMOLE-567: Merge add specific connection stability test to tunnel implementations.

2018-09-07 Thread vnick
GUACAMOLE-567: Merge add specific connection stability test to tunnel 
implementations.


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

Branch: refs/heads/master
Commit: 7640065345cca573300a6e133c9374b6840267e2
Parents: 402ddb5 34bab95
Author: Nick Couchman 
Authored: Fri Sep 7 19:03:49 2018 -0400
Committer: Nick Couchman 
Committed: Fri Sep 7 19:03:49 2018 -0400

--
 .../src/main/webapp/modules/Tunnel.js   |  82 -
 .../GuacamoleWebSocketTunnelEndpoint.java   | 121 +--
 .../jetty8/GuacamoleWebSocketTunnelServlet.java | 111 -
 .../GuacamoleWebSocketTunnelListener.java   | 121 +--
 .../tomcat/GuacamoleWebSocketTunnelServlet.java | 110 -
 .../app/client/controllers/clientController.js  |   2 +-
 .../webapp/app/client/types/ManagedClient.js|   8 +-
 .../app/client/types/ManagedClientState.js  |  40 --
 8 files changed, 543 insertions(+), 52 deletions(-)
--




[01/10] guacamole-manual git commit: GUACAMOLE-524: Document ldap-user-attributes property that may be added to guacamole.properties

2018-07-13 Thread vnick
Repository: guacamole-manual
Updated Branches:
  refs/heads/master faed84f53 -> 95865af65


GUACAMOLE-524: Document ldap-user-attributes property that may be added
to guacamole.properties


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

Branch: refs/heads/master
Commit: ed7260732d747169c204dd8412a6bf85b960aee2
Parents: 744e719
Author: Jared Frees 
Authored: Mon Jul 2 11:55:47 2018 -0400
Committer: Jared Frees 
Committed: Mon Jul 2 11:55:47 2018 -0400

--
 src/chapters/ldap-auth.xml | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/ed726073/src/chapters/ldap-auth.xml
--
diff --git a/src/chapters/ldap-auth.xml b/src/chapters/ldap-auth.xml
index 60e34f7..47d969d 100644
--- a/src/chapters/ldap-auth.xml
+++ b/src/chapters/ldap-auth.xml
@@ -357,6 +357,17 @@ dn: cn={4}guacConfigGroup,cn=schema,cn=config
 
 
 
+ldap-user-attributes
+
+The attribute or attributes to retrieve from the 
LDAP directory.
+These attributes are stored as tokens with the 
prefix "GUAC_ATTR_"
+and the name of the attribute appended in 
uppercase letters.
+The value of the token is the value of the 
attribute in the LDAP directory.
+If the attribute has no value in the directory 
then the token is not saved.
+Multiple attributes can be specified here, 
separated by commas.
+
+
+
 ldap-user-search-filter
 
 The search filter used to query the LDAP tree 
for users that
@@ -539,7 +550,7 @@ member: 
cn=user2,ou=people,dc=example,dc=net
 utility:
 
 $ ldapadd -x -D 
cn=admin,dc=example,dc=net -W -f 
example-connection.ldif
-Enter LDAP Password: 
+Enter LDAP Password:
 adding new entry "cn=Example Connection,ou=groups,dc=example,dc=net"
 
 $



[06/10] guacamole-manual git commit: GUACAMOLE-524: Correct what happens for a multi-valued attribute

2018-07-13 Thread vnick
GUACAMOLE-524: Correct what happens for a multi-valued attribute


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

Branch: refs/heads/master
Commit: df26b02fae822c810df7973142f590597fe7727c
Parents: 9983611
Author: Jared Frees 
Authored: Thu Jul 5 12:36:24 2018 -0400
Committer: Jared Frees 
Committed: Thu Jul 5 12:36:24 2018 -0400

--
 src/chapters/ldap-auth.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/df26b02f/src/chapters/ldap-auth.xml
--
diff --git a/src/chapters/ldap-auth.xml b/src/chapters/ldap-auth.xml
index 19f0b1d..58f9dbf 100644
--- a/src/chapters/ldap-auth.xml
+++ b/src/chapters/ldap-auth.xml
@@ -366,8 +366,8 @@ dn: cn={4}guacConfigGroup,cn=schema,cn=config
 in the LDAP directory for the currently logged-in 
user. If the attribute
 has no value in the LDAP directory then the token 
is not saved.
 If the attribute has multiple values in the LDAP 
directory then the token
-saves all of the values together. Multiple 
attributes can be specified here,
-separated by commas.
+saves the first value of the attribute. Multiple 
attributes can be
+specified here, separated by commas.
 
 
 



[02/10] guacamole-manual git commit: GUACAMOLE-524: Document the added attribute tokens in Configuring Guacamole

2018-07-13 Thread vnick
GUACAMOLE-524: Document the added attribute tokens in Configuring Guacamole


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

Branch: refs/heads/master
Commit: be2091a73aaf881fa2e64b38368e705569bf29da
Parents: ed72607
Author: Jared Frees 
Authored: Mon Jul 2 12:13:16 2018 -0400
Committer: Jared Frees 
Committed: Mon Jul 2 12:13:16 2018 -0400

--
 src/chapters/configuring.xml | 28 
 1 file changed, 20 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/be2091a7/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index 8cb89e3..f2714ae 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -1,6 +1,6 @@
 
 
-http://docbook.org/ns/docbook; version="5.0" xml:lang="en"
 xmlns:xi="http://www.w3.org/2001/XInclude;>
 
@@ -328,7 +328,7 @@ guacd-port: 4822
 located at 
GUACAMOLE_HOME/user-mapping.xml. An example of a
 user mapping file is included with Guacamole, and looks 
something like this:
 user-mapping>
-   
+
 !-- Per-user authentication and config information -->
 authorize username="USERNAME" password="PASSWORD">
 protocol>vnc/protocol>
@@ -339,7 +339,7 @@ guacd-port: 4822
 
 !-- Another user, but using md5 to hash the password
  (example below uses the md5 hash of "PASSWORD") -->
-authorize 
+authorize
 username="USERNAME2"
 password="319f4d26e3c536b5dd871bb2c52e3178"
 encoding="md5">
@@ -2484,10 +2484,10 @@ ed272546-87bd-4db9-acba-e36e1a9ca20a
 
 
sftp-server-alive-interval
 
-The interval in seconds at which to 
send keepalive 
-packets to the SSH server for the SFTP 
connection.  This 
-parameter is optional.  If omitted, the 
default of 0 will be 
-used, disabling sending keepalive packets. 
 The minimum 
+The interval in seconds at which to 
send keepalive
+packets to the SSH server for the SFTP 
connection.  This
+parameter is optional.  If omitted, the 
default of 0 will be
+used, disabling sending keepalive packets. 
 The minimum
 value is 2.
 
 
@@ -2610,7 +2610,7 @@ ed272546-87bd-4db9-acba-e36e1a9ca20a
 
 
disable-offscreen-caching
 
-  
+
 RDP
 offscreen bitmap 
caching
 RDP normally maintains 
caches of regions of the screen
@@ -4033,6 +4033,18 @@ guaclog: INFO: All files interpreted 
successfully.
 time that the connection began.
 
 
+
+
${GUAC_ATTR_CUSTOM_ATTRIBUTE_NAME}
+
+An attribute value specified on the current 
Guacamole user.
+CUSTOM_ATTRIBUTE_NAME 
is a custom attrbiute
+name specified in guacamole.properties. The values 
for these attributes
+are queried from the LDAP directory when the user 
is authenticated.
+There is a token for each attribute specified in 
guacamole.properties,
+so the number of these tokens is arbitrary. If no 
attributes
+are specified then these tokens do not 
exist.
+
+
 
 Note that these tokens are replaced dynamically each time a 
connection is used. If
 two different users access the same connection at the same 
time, both users will be



[09/10] guacamole-manual git commit: GUACAMOLE-524: Fixed typo and formatting

2018-07-13 Thread vnick
GUACAMOLE-524: Fixed typo and formatting


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/433cbf95
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/433cbf95
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/433cbf95

Branch: refs/heads/master
Commit: 433cbf9599fada9d8209cfc562a5219226e3d43d
Parents: 1ee6ba9
Author: Jared Frees 
Authored: Fri Jul 13 09:30:09 2018 -0400
Committer: Jared Frees 
Committed: Fri Jul 13 09:30:09 2018 -0400

--
 src/chapters/ldap-auth.xml | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/433cbf95/src/chapters/ldap-auth.xml
--
diff --git a/src/chapters/ldap-auth.xml b/src/chapters/ldap-auth.xml
index 951758c..9796676 100644
--- a/src/chapters/ldap-auth.xml
+++ b/src/chapters/ldap-auth.xml
@@ -369,17 +369,17 @@ dn: cn={4}guacConfigGroup,cn=schema,cn=config
 saves the first value of the attribute. Multiple 
attributes can be
 specified here, separated by commas.
 For example, if 
ldap-user-attributes is
-"mail, workstation", then a 
GUAC_ATTR_MAIL
-token would be set to the value of the mail attribute 
in the LDAP directory
-for the currently logged-in user and a 
GUAC_ATTR_WORKSTATION token
-would be set to the value of the workstation attribute 
similarly,
-contingent on the fact that the attributes have a 
value in the LDAP directory.
-So, the tokens could be used like this:
-${GUAC_ATTR_MAIL} or 
${GUAC_ATTR_WORKSTATION}/.
-If the value of mail in the LDAP directory is 
"exam...@email.com" then
-${GUAC_ATTR_MAIL} would have the 
value "exam...@email.com".
-Tokens usage is discussed more in  in
-.
+"mail, workstation", then 
a GUAC_ATTR_MAIL
+token would be set to the value of the mail 
attribute in the LDAP directory
+for the currently logged-in user and a 
GUAC_ATTR_WORKSTATION token
+would be set to the value of the workstation 
attribute similarly,
+contingent on the fact that the attributes have a 
value in the LDAP directory.
+So, the tokens could be used like this:
+${GUAC_ATTR_MAIL} or 
${GUAC_ATTR_WORKSTATION}.
+If the value of mail in the LDAP directory is 
"exam...@email.com" then
+${GUAC_ATTR_MAIL} would have 
the value "exam...@email.com".
+Tokens usage is discussed more in  in
+.
 
 
 



[08/10] guacamole-manual git commit: GUACAMOLE-524: Added in two spots where it was missing

2018-07-13 Thread vnick
GUACAMOLE-524: Added  in two spots where it was missing


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/1ee6ba9f
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/1ee6ba9f
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/1ee6ba9f

Branch: refs/heads/master
Commit: 1ee6ba9fbe7cc19b85cb1f0efe76e63054a1206c
Parents: 86cbb0b
Author: Jared Frees 
Authored: Tue Jul 10 11:49:29 2018 -0400
Committer: Jared Frees 
Committed: Tue Jul 10 11:49:29 2018 -0400

--
 src/chapters/configuring.xml | 2 +-
 src/chapters/ldap-auth.xml   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/1ee6ba9f/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index d0548ff..e4acadb 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -4043,7 +4043,7 @@ guaclog: INFO: All files interpreted 
successfully.
 number of these tokens. If no attributes are 
specified
 then this token does not exist.
 For example, if an attribute name is specified 
as "mail" then a token would
-be set as ${GUAC_ATTR_MAIL} with the value of 
"mail" in the authentication
+be set as ${GUAC_ATTR_MAIL} 
with the value of "mail" in the authentication
 module that "mail" is specified in. For a 
practical example, see
 ldap-user-attributes in .
 

http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/1ee6ba9f/src/chapters/ldap-auth.xml
--
diff --git a/src/chapters/ldap-auth.xml b/src/chapters/ldap-auth.xml
index 45e728d..951758c 100644
--- a/src/chapters/ldap-auth.xml
+++ b/src/chapters/ldap-auth.xml
@@ -377,7 +377,7 @@ dn: cn={4}guacConfigGroup,cn=schema,cn=config
 So, the tokens could be used like this:
 ${GUAC_ATTR_MAIL} or 
${GUAC_ATTR_WORKSTATION}/.
 If the value of mail in the LDAP directory is 
"exam...@email.com" then
-${GUAC_ATTR_MAIL} would have the value 
"exam...@email.com".
+${GUAC_ATTR_MAIL} would have the 
value "exam...@email.com".
 Tokens usage is discussed more in  in
 .
 



[07/10] guacamole-manual git commit: GUACAMOLE-524: Added exmaples and links for attribute tokens

2018-07-13 Thread vnick
GUACAMOLE-524: Added exmaples and links for attribute tokens


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/86cbb0b8
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/86cbb0b8
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/86cbb0b8

Branch: refs/heads/master
Commit: 86cbb0b86bb71cdb50ecaac5361dea5ee3127a32
Parents: df26b02
Author: Jared Frees 
Authored: Tue Jul 10 11:46:02 2018 -0400
Committer: Jared Frees 
Committed: Tue Jul 10 11:46:02 2018 -0400

--
 src/chapters/configuring.xml |  4 
 src/chapters/ldap-auth.xml   | 12 
 2 files changed, 16 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/86cbb0b8/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index de25f7e..d0548ff 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -4042,6 +4042,10 @@ guaclog: INFO: All files interpreted 
successfully.
 modules that implement the feature. There are an 
arbitrary
 number of these tokens. If no attributes are 
specified
 then this token does not exist.
+For example, if an attribute name is specified 
as "mail" then a token would
+be set as ${GUAC_ATTR_MAIL} with the value of 
"mail" in the authentication
+module that "mail" is specified in. For a 
practical example, see
+ldap-user-attributes in .
 
 
 

http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/86cbb0b8/src/chapters/ldap-auth.xml
--
diff --git a/src/chapters/ldap-auth.xml b/src/chapters/ldap-auth.xml
index 58f9dbf..45e728d 100644
--- a/src/chapters/ldap-auth.xml
+++ b/src/chapters/ldap-auth.xml
@@ -368,6 +368,18 @@ dn: cn={4}guacConfigGroup,cn=schema,cn=config
 If the attribute has multiple values in the LDAP 
directory then the token
 saves the first value of the attribute. Multiple 
attributes can be
 specified here, separated by commas.
+For example, if 
ldap-user-attributes is
+"mail, workstation", then a 
GUAC_ATTR_MAIL
+token would be set to the value of the mail attribute 
in the LDAP directory
+for the currently logged-in user and a 
GUAC_ATTR_WORKSTATION token
+would be set to the value of the workstation attribute 
similarly,
+contingent on the fact that the attributes have a 
value in the LDAP directory.
+So, the tokens could be used like this:
+${GUAC_ATTR_MAIL} or 
${GUAC_ATTR_WORKSTATION}/.
+If the value of mail in the LDAP directory is 
"exam...@email.com" then
+${GUAC_ATTR_MAIL} would have the value 
"exam...@email.com".
+Tokens usage is discussed more in  in
+.
 
 
 



[10/10] guacamole-manual git commit: GUACAMOLE-524: Merge documentation of user attribute tokens.

2018-07-13 Thread vnick
GUACAMOLE-524: Merge documentation of user attribute tokens.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-manual/commit/95865af6
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-manual/tree/95865af6
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-manual/diff/95865af6

Branch: refs/heads/master
Commit: 95865af6544123cc48195f4e6650ce7e01a500d3
Parents: faed84f 433cbf9
Author: Nick Couchman 
Authored: Fri Jul 13 10:25:42 2018 -0400
Committer: Nick Couchman 
Committed: Fri Jul 13 10:25:42 2018 -0400

--
 src/chapters/configuring.xml | 31 +++
 src/chapters/ldap-auth.xml   | 28 +++-
 2 files changed, 50 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/95865af6/src/chapters/configuring.xml
--



[05/10] guacamole-manual git commit: GUACAMOLE-524: Fixed wording

2018-07-13 Thread vnick
GUACAMOLE-524: Fixed wording


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

Branch: refs/heads/master
Commit: 9983611526ff61e79eced9e31faaef684865a782
Parents: a6139b2
Author: Jared Frees 
Authored: Thu Jul 5 11:18:29 2018 -0400
Committer: Jared Frees 
Committed: Thu Jul 5 11:18:29 2018 -0400

--
 src/chapters/ldap-auth.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/99836115/src/chapters/ldap-auth.xml
--
diff --git a/src/chapters/ldap-auth.xml b/src/chapters/ldap-auth.xml
index d94eb12..19f0b1d 100644
--- a/src/chapters/ldap-auth.xml
+++ b/src/chapters/ldap-auth.xml
@@ -365,8 +365,9 @@ dn: cn={4}guacConfigGroup,cn=schema,cn=config
 in uppercase letters. The value of the token is 
the value of the attribute
 in the LDAP directory for the currently logged-in 
user. If the attribute
 has no value in the LDAP directory then the token 
is not saved.
-If the LDAP attribute has multiple values then the 
token saves all of the
-values together. Multiple attributes can be 
specified here, separated by commas.
+If the attribute has multiple values in the LDAP 
directory then the token
+saves all of the values together. Multiple 
attributes can be specified here,
+separated by commas.
 
 
 



[03/10] guacamole-manual git commit: GUACAMOLE-524: Made attribute token explanation more generic

2018-07-13 Thread vnick
GUACAMOLE-524: Made attribute token explanation more generic


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

Branch: refs/heads/master
Commit: a18f596678719d626270a499b1f9fce93114bf9f
Parents: be2091a
Author: Jared Frees 
Authored: Thu Jul 5 11:00:46 2018 -0400
Committer: Jared Frees 
Committed: Thu Jul 5 11:00:46 2018 -0400

--
 src/chapters/configuring.xml | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/a18f5966/src/chapters/configuring.xml
--
diff --git a/src/chapters/configuring.xml b/src/chapters/configuring.xml
index f2714ae..de25f7e 100644
--- a/src/chapters/configuring.xml
+++ b/src/chapters/configuring.xml
@@ -4037,12 +4037,11 @@ guaclog: INFO: All files interpreted 
successfully.
 
${GUAC_ATTR_CUSTOM_ATTRIBUTE_NAME}
 
 An attribute value specified on the current 
Guacamole user.
-CUSTOM_ATTRIBUTE_NAME 
is a custom attrbiute
-name specified in guacamole.properties. The values 
for these attributes
-are queried from the LDAP directory when the user 
is authenticated.
-There is a token for each attribute specified in 
guacamole.properties,
-so the number of these tokens is arbitrary. If no 
attributes
-are specified then these tokens do not 
exist.
+CUSTOM_ATTRIBUTE_NAME 
is a custom
+user attribute that may be obtained from any of 
the authentication
+modules that implement the feature. There are an 
arbitrary
+number of these tokens. If no attributes are 
specified
+then this token does not exist.
 
 
 



[04/10] guacamole-manual git commit: GUACAMOLE-524: Clarify ldap attributes are for logged in user and multiple-valued attributes are saved all together as a token

2018-07-13 Thread vnick
GUACAMOLE-524: Clarify ldap attributes are for logged in user and 
multiple-valued attributes are saved all together as a token


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

Branch: refs/heads/master
Commit: a6139b2d191c93021ebeaf92879490bf174f3c55
Parents: a18f596
Author: Jared Frees 
Authored: Thu Jul 5 11:16:27 2018 -0400
Committer: Jared Frees 
Committed: Thu Jul 5 11:16:27 2018 -0400

--
 src/chapters/ldap-auth.xml | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-manual/blob/a6139b2d/src/chapters/ldap-auth.xml
--
diff --git a/src/chapters/ldap-auth.xml b/src/chapters/ldap-auth.xml
index 47d969d..d94eb12 100644
--- a/src/chapters/ldap-auth.xml
+++ b/src/chapters/ldap-auth.xml
@@ -359,12 +359,14 @@ dn: cn={4}guacConfigGroup,cn=schema,cn=config
 
 ldap-user-attributes
 
-The attribute or attributes to retrieve from the 
LDAP directory.
-These attributes are stored as tokens with the 
prefix "GUAC_ATTR_"
-and the name of the attribute appended in 
uppercase letters.
-The value of the token is the value of the 
attribute in the LDAP directory.
-If the attribute has no value in the directory 
then the token is not saved.
-Multiple attributes can be specified here, 
separated by commas.
+The attribute or attributes to retrieve from the 
LDAP directory
+for the currently logged-in user. These attributes 
are stored as
+tokens with the prefix "GUAC_ATTR_" and the name 
of the attribute appended
+in uppercase letters. The value of the token is 
the value of the attribute
+in the LDAP directory for the currently logged-in 
user. If the attribute
+has no value in the LDAP directory then the token 
is not saved.
+If the LDAP attribute has multiple values then the 
token saves all of the
+values together. Multiple attributes can be 
specified here, separated by commas.
 
 
 



[17/23] guacamole-client git commit: GUACAMOLE-352: Remove margin and padding from input sink.

2018-01-16 Thread vnick
GUACAMOLE-352: Remove margin and padding from input sink.

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

Branch: refs/heads/master
Commit: b61f12d69d03f57dcdc6195f62b097c6a30dad3e
Parents: 4b93347
Author: Michael Jumper 
Authored: Tue Dec 19 09:42:33 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 10:20:43 2018 -0800

--
 guacamole-common-js/src/main/webapp/modules/Keyboard.js | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/b61f12d6/guacamole-common-js/src/main/webapp/modules/Keyboard.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js 
b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index 5495867..6902610 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -1443,6 +1443,8 @@ Guacamole.Keyboard.InputSink = function InputSink() {
 field.style.position   = 'fixed';
 field.style.outline= 'none';
 field.style.border = 'none';
+field.style.margin = '0';
+field.style.padding= '0';
 field.style.height = '0';
 field.style.width  = '0';
 field.style.left   = '0';



[06/23] guacamole-client git commit: GUACAMOLE-352: Handle "input" / "compositionend" events in a mutually-exclusive manner, as they may conflict.

2018-01-16 Thread vnick
GUACAMOLE-352: Handle "input" / "compositionend" events in a mutually-exclusive 
manner, as they may conflict.


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

Branch: refs/heads/master
Commit: cdacd570992ed57bd8b01eea3438473e3ddf0e6a
Parents: 3ee73d8
Author: Michael Jumper 
Authored: Sun Dec 17 21:17:46 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 09:50:54 2018 -0800

--
 .../src/main/webapp/modules/Keyboard.js | 41 
 1 file changed, 33 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/cdacd570/guacamole-common-js/src/main/webapp/modules/Keyboard.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js 
b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index 42020c7..e16d48e 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -1207,29 +1207,54 @@ Guacamole.Keyboard = function(element) {
 
 }, true);
 
-// Automatically type text entered into the wrapped element
-element.addEventListener("input", function(e) {
+/**
+ * Handles the given "input" event, typing the data within the input text.
+ * If the event is complete (text is provided), handling of 
"compositionend"
+ * events is suspended, as such events may conflict with input events.
+ *
+ * @private
+ * @param {InputEvent} e
+ * The "input" event to handle.
+ */
+var handleInput = function handleInput(e) {
 
 // Only intercept if handler set
 if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return;
 
 // Type all content written
-if (e.data)
+if (e.data) {
+element.removeEventListener("compositionend", handleComposition, 
false);
 guac_keyboard.type(e.data);
+}
 
-}, false);
+};
 
-// Automatically type the result of composed characters/text
-element.addEventListener("compositionend", function(e) {
+/**
+ * Handles the given "compositionend" event, typing the data within the
+ * composed text. If the event is complete (composed text is provided),
+ * handling of "input" events is suspended, as such events may conflict
+ * with composition events.
+ *
+ * @private
+ * @param {CompositionEvent} e
+ * The "compositionend" event to handle.
+ */
+var handleComposition = function handleComposition(e) {
 
 // Only intercept if handler set
 if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return;
 
 // Type all content written
-if (e.data)
+if (e.data) {
+element.removeEventListener("input", handleInput, false);
 guac_keyboard.type(e.data);
+}
 
-}, false);
+};
+
+// Automatically type text entered into the wrapped element
+element.addEventListener("input", handleInput, false);
+element.addEventListener("compositionend", handleComposition, false);
 
 };
 



[05/23] guacamole-client git commit: GUACAMOLE-352: Do not attempt to send dead keys (only the composed key should be sent).

2018-01-16 Thread vnick
GUACAMOLE-352: Do not attempt to send dead keys (only the composed key should 
be sent).

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

Branch: refs/heads/master
Commit: 9dc86119b0190a5c4f573474e8d78c3bb2381456
Parents: bd73f9c
Author: Michael Jumper 
Authored: Sun Dec 17 19:13:36 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 09:50:54 2018 -0800

--
 .../src/main/webapp/modules/Keyboard.js | 16 
 1 file changed, 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/9dc86119/guacamole-common-js/src/main/webapp/modules/Keyboard.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js 
b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index e41b03e..0480d4d 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -459,22 +459,6 @@ Guacamole.Keyboard = function(element) {
 "Compose": [0xFF20],
 "Control": [0xFFE3, 0xFFE3, 0xFFE4],
 "ContextMenu": [0xFF67],
-"DeadGrave": [0xFE50],
-"DeadAcute": [0xFE51],
-"DeadCircumflex": [0xFE52],
-"DeadTilde": [0xFE53],
-"DeadMacron": [0xFE54],
-"DeadBreve": [0xFE55],
-"DeadAboveDot": [0xFE56],
-"DeadUmlaut": [0xFE57],
-"DeadAboveRing": [0xFE58],
-"DeadDoubleacute": [0xFE59],
-"DeadCaron": [0xFE5A],
-"DeadCedilla": [0xFE5B],
-"DeadOgonek": [0xFE5C],
-"DeadIota": [0xFE5D],
-"DeadVoicedSound": [0xFE5E],
-"DeadSemivoicedSound": [0xFE5F],
 "Delete": [0x],
 "Down": [0xFF54],
 "End": [0xFF57],



[10/23] guacamole-client git commit: GUACAMOLE-352: Allow additional elements to be added to a single Guacamole.Keyboard.

2018-01-16 Thread vnick
GUACAMOLE-352: Allow additional elements to be added to a single 
Guacamole.Keyboard.


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

Branch: refs/heads/master
Commit: 2d26d24dda30ba3679c3259e920487fdf28865bf
Parents: 0582290
Author: Michael Jumper 
Authored: Mon Dec 18 10:58:50 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 10:20:41 2018 -0800

--
 .../src/main/webapp/modules/Keyboard.js | 272 ---
 1 file changed, 180 insertions(+), 92 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/2d26d24d/guacamole-common-js/src/main/webapp/modules/Keyboard.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js 
b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index 3cc28f8..c25a1fd 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -25,9 +25,12 @@ var Guacamole = Guacamole || {};
  * which represent keys as their corresponding X11 keysym.
  * 
  * @constructor
- * @param {Element} element The Element to use to provide keyboard events.
+ * @param {Element} [element]
+ *The Element to use to provide keyboard events. If omitted, at least one
+ *Element must be manually provided through the listenTo() function for
+ *the Guacamole.Keyboard instance to have any effect.
  */
-Guacamole.Keyboard = function(element) {
+Guacamole.Keyboard = function Keyboard(element) {
 
 /**
  * Reference to this Guacamole.Keyboard.
@@ -36,6 +39,25 @@ Guacamole.Keyboard = function(element) {
 var guac_keyboard = this;
 
 /**
+ * An integer value which uniquely identifies this Guacamole.Keyboard
+ * instance with respect to other Guacamole.Keyboard instances.
+ *
+ * @private
+ * @type {Number}
+ */
+var guacKeyboardID = Guacamole.Keyboard._nextID++;
+
+/**
+ * The name of the property which is added to event objects via markEvent()
+ * to note that they have already been handled by this Guacamole.Keyboard.
+ *
+ * @private
+ * @constant
+ * @type {String}
+ */
+var EVENT_MARKER = '_GUAC_KEYBOARD_HANDLED_BY_' + guacKeyboardID;
+
+/**
  * Fired whenever the user presses a key with the element associated
  * with this Guacamole.Keyboard in focus.
  * 
@@ -1134,131 +1156,197 @@ Guacamole.Keyboard = function(element) {
 
 };
 
-// When key pressed
-element.addEventListener("keydown", function(e) {
+/**
+ * Attempts to mark the given Event as having been handled by this
+ * Guacamole.Keyboard. If the Event has already been marked as handled,
+ * false is returned.
+ *
+ * @param {Event} e
+ * The Event to mark.
+ *
+ * @returns {Boolean}
+ * true if the given Event was successfully marked, false if the given
+ * Event was already marked.
+ */
+var markEvent = function markEvent(e) {
+
+// Fail if event is already marked
+if (e[EVENT_MARKER])
+return false;
+
+// Mark event otherwise
+e[EVENT_MARKER] = true;
+return true;
+
+};
+
+/**
+ * Attaches event listeners to the given Element, automatically translating
+ * received key, input, and composition events into simple keydown/keyup
+ * events signalled through this Guacamole.Keyboard's onkeydown and
+ * onkeyup handlers.
+ *
+ * @param {Element} element
+ * The Element to attach event listeners to for the sake of handling
+ * key or input events.
+ */
+this.listenTo = function listenTo(element) {
+
+// When key pressed
+element.addEventListener("keydown", function(e) {
 
-// Only intercept if handler set
-if (!guac_keyboard.onkeydown) return;
+// Only intercept if handler set
+if (!guac_keyboard.onkeydown) return;
 
-var keyCode;
-if (window.event) keyCode = window.event.keyCode;
-else if (e.which) keyCode = e.which;
+// Ignore events which have already been handled
+if (!markEvent(e)) return;
 
-// Fix modifier states
-syncModifierStates(e);
+var keyCode;
+if (window.event) keyCode = window.event.keyCode;
+else if (e.which) keyCode = e.which;
 
-// Ignore (but do not prevent) the "composition" keycode sent by some
-// browsers when an IME is in use (see: 

[03/23] guacamole-client git commit: GUACAMOLE-352: Only attempt to type fully-composed strings.

2018-01-16 Thread vnick
GUACAMOLE-352: Only attempt to type fully-composed strings.

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

Branch: refs/heads/master
Commit: fd47d1d7efe966813be75dab4bbb7af0ee912d8f
Parents: cdacd57
Author: Michael Jumper 
Authored: Sun Dec 17 21:28:12 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 09:50:54 2018 -0800

--
 .../src/main/webapp/modules/Keyboard.js | 28 ++--
 1 file changed, 26 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/fd47d1d7/guacamole-common-js/src/main/webapp/modules/Keyboard.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js 
b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index e16d48e..4c4b1ba 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -1208,6 +1208,30 @@ Guacamole.Keyboard = function(element) {
 }, true);
 
 /**
+ * Returns whether the given string is fully composed. A string is fully
+ * composed if it does not end with combining characters.
+ *
+ * @private
+ * @param {String} str
+ * The string to test.
+ *
+ * @returns {Boolean}
+ * true of the string is fully composed, false otherwise.
+ */
+var isComposed = function isComposed(str) {
+
+// The empty string is fully composed
+if (!str)
+return true;
+
+// Test whether the last character is within the "Combining
+// Diacritical Marks" Unicode block (U+0300 through U+036F)
+var lastCodepoint = str.charCodeAt(str.length - 1);
+return !(lastCodepoint >= 0x0300 && lastCodepoint <= 0x036F);
+
+};
+
+/**
  * Handles the given "input" event, typing the data within the input text.
  * If the event is complete (text is provided), handling of 
"compositionend"
  * events is suspended, as such events may conflict with input events.
@@ -1222,7 +1246,7 @@ Guacamole.Keyboard = function(element) {
 if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return;
 
 // Type all content written
-if (e.data) {
+if (e.data && isComposed(e.data)) {
 element.removeEventListener("compositionend", handleComposition, 
false);
 guac_keyboard.type(e.data);
 }
@@ -1245,7 +1269,7 @@ Guacamole.Keyboard = function(element) {
 if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return;
 
 // Type all content written
-if (e.data) {
+if (e.data && isComposed(e.data)) {
 element.removeEventListener("input", handleInput, false);
 guac_keyboard.type(e.data);
 }



[01/23] guacamole-client git commit: GUACAMOLE-352: Refocus InputSink through key events rather than clicks.

2018-01-16 Thread vnick
Repository: guacamole-client
Updated Branches:
  refs/heads/master bd73f9ca7 -> 073dbe724


GUACAMOLE-352: Refocus InputSink through key events rather than clicks.

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

Branch: refs/heads/master
Commit: 05822907b46528ac91c8405c1da2f38602309572
Parents: f696860
Author: Michael Jumper 
Authored: Mon Dec 18 10:40:59 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 09:50:54 2018 -0800

--
 guacamole-common-js/src/main/webapp/modules/Keyboard.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/05822907/guacamole-common-js/src/main/webapp/modules/Keyboard.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js 
b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index ea7128b..3cc28f8 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -1398,7 +1398,7 @@ Guacamole.Keyboard.InputSink = function InputSink() {
 };
 
 // Automatically refocus input sink if part of DOM
-document.addEventListener("click", function refocusSink(e) {
+document.addEventListener("keydown", function refocusSink(e) {
 
 // Do not refocus if focus is on an input field
 var focused = document.activeElement;
@@ -1407,7 +1407,6 @@ Guacamole.Keyboard.InputSink = function InputSink() {
 
 // Refocus input sink instead of handling click
 sink.focus();
-e.preventDefault();
 
 }, true);
 



[04/23] guacamole-client git commit: GUACAMOLE-352: Handle both "input" and "compositionend" events as sources of keys.

2018-01-16 Thread vnick
GUACAMOLE-352: Handle both "input" and "compositionend" events as sources of 
keys.


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

Branch: refs/heads/master
Commit: 3ee73d835c3a3ac8b275fea7220aa7ee1fa6ab6a
Parents: 9dc8611
Author: Michael Jumper 
Authored: Sun Dec 17 21:09:15 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 09:50:54 2018 -0800

--
 .../src/main/webapp/modules/Keyboard.js | 48 
 1 file changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/3ee73d83/guacamole-common-js/src/main/webapp/modules/Keyboard.js
--
diff --git a/guacamole-common-js/src/main/webapp/modules/Keyboard.js 
b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
index 0480d4d..42020c7 100644
--- a/guacamole-common-js/src/main/webapp/modules/Keyboard.js
+++ b/guacamole-common-js/src/main/webapp/modules/Keyboard.js
@@ -827,6 +827,30 @@ Guacamole.Keyboard = function(element) {
 };
 
 /**
+ * Presses and releases the keys necessary to type the given string of
+ * text.
+ *
+ * @param {String} str
+ * The string to type.
+ */
+this.type = function type(str) {
+
+// Press/release the key corresponding to each character in the string
+for (var i = 0; i < str.length; i++) {
+
+// Determine keysym of current character
+var codepoint = str.codePointAt ? str.codePointAt(i) : 
str.charCodeAt(i);
+var keysym = keysym_from_charcode(codepoint);
+
+// Press and release key for current character
+guac_keyboard.press(keysym);
+guac_keyboard.release(keysym);
+
+}
+
+};
+
+/**
  * Resets the state of this keyboard, releasing all keys, and firing keyup
  * events for each released key.
  */
@@ -1183,6 +1207,30 @@ Guacamole.Keyboard = function(element) {
 
 }, true);
 
+// Automatically type text entered into the wrapped element
+element.addEventListener("input", function(e) {
+
+// Only intercept if handler set
+if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return;
+
+// Type all content written
+if (e.data)
+guac_keyboard.type(e.data);
+
+}, false);
+
+// Automatically type the result of composed characters/text
+element.addEventListener("compositionend", function(e) {
+
+// Only intercept if handler set
+if (!guac_keyboard.onkeydown && !guac_keyboard.onkeyup) return;
+
+// Type all content written
+if (e.data)
+guac_keyboard.type(e.data);
+
+}, false);
+
 };
 
 /**



[18/23] guacamole-client git commit: GUACAMOLE-352: Prevent "input" event from clipboard integration from triggering keystrokes.

2018-01-16 Thread vnick
GUACAMOLE-352: Prevent "input" event from clipboard integration from triggering 
keystrokes.

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

Branch: refs/heads/master
Commit: d8de3a77f250bdd94a5944c7b977aa2da0916233
Parents: 802fec9
Author: Michael Jumper 
Authored: Mon Dec 18 16:02:45 2017 -0800
Committer: Michael Jumper 
Committed: Tue Jan 16 10:20:43 2018 -0800

--
 .../src/main/webapp/app/clipboard/services/clipboardService.js  | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/d8de3a77/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
--
diff --git 
a/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js 
b/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
index 06abb04..920006e 100644
--- a/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
+++ b/guacamole/src/main/webapp/app/clipboard/services/clipboardService.js
@@ -89,6 +89,7 @@ angular.module('clipboard').factory('clipboardService', 
['$injector',
 clipboardContent.addEventListener('cut',   stopEventPropagation);
 clipboardContent.addEventListener('copy',  stopEventPropagation);
 clipboardContent.addEventListener('paste', stopEventPropagation);
+clipboardContent.addEventListener('input', stopEventPropagation);
 
 /**
  * A stack of past node selection ranges. A range convering the nodes



[23/23] guacamole-client git commit: GUACAMOLE-352: Merge work around lack of key events for dead keys.

2018-01-16 Thread vnick
GUACAMOLE-352: Merge work around lack of key events for dead keys.


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

Branch: refs/heads/master
Commit: 073dbe7240bcbd1246cbc1a5c035cb1e9e4bc9b0
Parents: bd73f9c a49bfad
Author: Nick Couchman 
Authored: Tue Jan 16 13:40:43 2018 -0500
Committer: Nick Couchman 
Committed: Tue Jan 16 13:40:43 2018 -0500

--
 .../src/main/webapp/modules/InputSink.js| 128 +
 .../src/main/webapp/modules/Keyboard.js | 283 ++-
 .../webapp/app/client/templates/client.html |   2 +-
 .../app/clipboard/services/clipboardService.js  |   1 +
 .../app/index/controllers/indexController.js|   5 +
 5 files changed, 349 insertions(+), 70 deletions(-)
--




<    1   2   3   4   5   6   7   8   9   10   >