mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +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 | ||||
|         MySQLConnection connection = connectionService.createConnection( | ||||
|                 name, object.getConfiguration().getProtocol(), user_id); | ||||
|                 name, object.getConfiguration().getProtocol(), user_id, parentID); | ||||
|  | ||||
|         // Add connection parameters | ||||
|         createConfigurationValues(connection.getConnectionID(), | ||||
|   | ||||
| @@ -162,7 +162,7 @@ public class ConnectionGroupDirectory implements Directory<String, ConnectionGro | ||||
|  | ||||
|         // Create connection group | ||||
|         MySQLConnectionGroup connectionGroup = connectionGroupService | ||||
|                 .createConnectionGroup(name, user_id); | ||||
|                 .createConnectionGroup(name, user_id, parentID); | ||||
|  | ||||
|         // Finally, give the current user full access to the newly created | ||||
|         // connection group. | ||||
|   | ||||
| @@ -276,11 +276,13 @@ public class ConnectionGroupService { | ||||
|      * @return A new MySQLConnectionGroup containing the data of the newly created | ||||
|      *         connection group. | ||||
|      */ | ||||
|     public MySQLConnectionGroup createConnectionGroup(String name, int userID) { | ||||
|     public MySQLConnectionGroup createConnectionGroup(String name, int userID,  | ||||
|             Integer parentID) { | ||||
|  | ||||
|         // Initialize database connection | ||||
|         ConnectionGroup connectionGroup = new ConnectionGroup(); | ||||
|         connectionGroup.setConnection_group_name(name); | ||||
|         connectionGroup.setParent_id(parentID); | ||||
|  | ||||
|         // Create connection | ||||
|         connectionGroupDAO.insert(connectionGroup); | ||||
|   | ||||
| @@ -376,15 +376,18 @@ public class ConnectionService { | ||||
|      * @param name The name 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 parentID The ID of the parent connection group. | ||||
|      * @return A new MySQLConnection containing the data of the newly created | ||||
|      *         connection. | ||||
|      */ | ||||
|     public MySQLConnection createConnection(String name, String protocol, int userID) { | ||||
|     public MySQLConnection createConnection(String name, String protocol, | ||||
|             int userID, Integer parentID) { | ||||
|  | ||||
|         // Initialize database connection | ||||
|         Connection connection = new Connection(); | ||||
|         connection.setConnection_name(name); | ||||
|         connection.setProtocol(protocol); | ||||
|         connection.setParent_id(parentID); | ||||
|  | ||||
|         // Create connection | ||||
|         connectionDAO.insert(connection); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user