mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
Ticket #263: Added parentID for created connections and groups.
This commit is contained in:
@@ -179,7 +179,7 @@ public class ConnectionDirectory implements Directory<String, Connection>{
|
|||||||
|
|
||||||
// Create connection
|
// Create connection
|
||||||
MySQLConnection connection = connectionService.createConnection(
|
MySQLConnection connection = connectionService.createConnection(
|
||||||
name, object.getConfiguration().getProtocol(), user_id);
|
name, object.getConfiguration().getProtocol(), user_id, parentID);
|
||||||
|
|
||||||
// Add connection parameters
|
// Add connection parameters
|
||||||
createConfigurationValues(connection.getConnectionID(),
|
createConfigurationValues(connection.getConnectionID(),
|
||||||
|
@@ -162,7 +162,7 @@ public class ConnectionGroupDirectory implements Directory<String, ConnectionGro
|
|||||||
|
|
||||||
// Create connection group
|
// Create connection group
|
||||||
MySQLConnectionGroup connectionGroup = connectionGroupService
|
MySQLConnectionGroup connectionGroup = connectionGroupService
|
||||||
.createConnectionGroup(name, user_id);
|
.createConnectionGroup(name, user_id, parentID);
|
||||||
|
|
||||||
// Finally, give the current user full access to the newly created
|
// Finally, give the current user full access to the newly created
|
||||||
// connection group.
|
// connection group.
|
||||||
|
@@ -276,11 +276,13 @@ public class ConnectionGroupService {
|
|||||||
* @return A new MySQLConnectionGroup containing the data of the newly created
|
* @return A new MySQLConnectionGroup containing the data of the newly created
|
||||||
* connection group.
|
* connection group.
|
||||||
*/
|
*/
|
||||||
public MySQLConnectionGroup createConnectionGroup(String name, int userID) {
|
public MySQLConnectionGroup createConnectionGroup(String name, int userID,
|
||||||
|
Integer parentID) {
|
||||||
|
|
||||||
// Initialize database connection
|
// Initialize database connection
|
||||||
ConnectionGroup connectionGroup = new ConnectionGroup();
|
ConnectionGroup connectionGroup = new ConnectionGroup();
|
||||||
connectionGroup.setConnection_group_name(name);
|
connectionGroup.setConnection_group_name(name);
|
||||||
|
connectionGroup.setParent_id(parentID);
|
||||||
|
|
||||||
// Create connection
|
// Create connection
|
||||||
connectionGroupDAO.insert(connectionGroup);
|
connectionGroupDAO.insert(connectionGroup);
|
||||||
|
@@ -376,15 +376,18 @@ public class ConnectionService {
|
|||||||
* @param name The name to assign to the new connection.
|
* @param name The name to assign to the new connection.
|
||||||
* @param protocol The protocol to assign to the new connection.
|
* @param protocol The protocol to assign to the new connection.
|
||||||
* @param userID The ID of the user who created this connection.
|
* @param userID The ID of the user who created this connection.
|
||||||
|
* @param parentID The ID of the parent connection group.
|
||||||
* @return A new MySQLConnection containing the data of the newly created
|
* @return A new MySQLConnection containing the data of the newly created
|
||||||
* connection.
|
* connection.
|
||||||
*/
|
*/
|
||||||
public MySQLConnection createConnection(String name, String protocol, int userID) {
|
public MySQLConnection createConnection(String name, String protocol,
|
||||||
|
int userID, Integer parentID) {
|
||||||
|
|
||||||
// Initialize database connection
|
// Initialize database connection
|
||||||
Connection connection = new Connection();
|
Connection connection = new Connection();
|
||||||
connection.setConnection_name(name);
|
connection.setConnection_name(name);
|
||||||
connection.setProtocol(protocol);
|
connection.setProtocol(protocol);
|
||||||
|
connection.setParent_id(parentID);
|
||||||
|
|
||||||
// Create connection
|
// Create connection
|
||||||
connectionDAO.insert(connection);
|
connectionDAO.insert(connection);
|
||||||
|
Reference in New Issue
Block a user