From 16455161568d658145d1bf0286c18287234806b4 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 10 Aug 2019 18:05:20 -0700 Subject: [PATCH] GUACAMOLE-360: Add TunnelRequestService support for joining active connections. --- .../apache/guacamole/tunnel/TunnelRequestType.java | 14 ++++++++++++++ .../app/navigation/types/ClientIdentifier.js | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestType.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestType.java index 654527a5a..2c987081b 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestType.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestType.java @@ -20,6 +20,7 @@ package org.apache.guacamole.tunnel; import org.apache.guacamole.GuacamoleException; +import org.apache.guacamole.net.auth.ActiveConnection; import org.apache.guacamole.net.auth.Connectable; import org.apache.guacamole.net.auth.Connection; import org.apache.guacamole.net.auth.ConnectionGroup; @@ -57,6 +58,19 @@ public enum TunnelRequestType { return userContext.getConnectionGroupDirectory().get(identifier); } + }, + + /** + * An active Guacamole connection. + */ + ACTIVE_CONNECTION("a", "active connection") { + + @Override + public ActiveConnection getConnectable(UserContext userContext, + String identifier) throws GuacamoleException { + return userContext.getActiveConnectionDirectory().get(identifier); + } + }; /** diff --git a/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js b/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js index 23daef2cf..3f6892405 100644 --- a/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js +++ b/guacamole/src/main/webapp/app/navigation/types/ClientIdentifier.js @@ -89,7 +89,14 @@ angular.module('client').factory('ClientIdentifier', ['$injector', * * @type String */ - CONNECTION_GROUP : 'g' + CONNECTION_GROUP : 'g', + + /** + * The type string for an active Guacamole connection. + * + * @type String + */ + ACTIVE_CONNECTION : 'a' };