GUACAMOLE-360: Add TunnelRequestService support for joining active connections.

This commit is contained in:
Michael Jumper
2019-08-10 18:05:20 -07:00
parent 1c7242b800
commit 1645516156
2 changed files with 22 additions and 1 deletions

View File

@@ -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);
}
};
/**

View File

@@ -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'
};