mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +00:00 
			
		
		
		
	Ticket #269: Do not requery connection when updating.
This commit is contained in:
		| @@ -199,12 +199,15 @@ public class ConnectionDirectory implements Directory<String, Connection>{ | |||||||
|     @Override |     @Override | ||||||
|     public void update(Connection object) throws GuacamoleException { |     public void update(Connection object) throws GuacamoleException { | ||||||
|  |  | ||||||
|  |         // If connection not actually from this auth provider, we can't handle | ||||||
|  |         // the update | ||||||
|  |         if (!(object instanceof MySQLConnection)) | ||||||
|  |             throw new GuacamoleException("Connection not from database."); | ||||||
|  |  | ||||||
|         // Verify permission to update |         // Verify permission to update | ||||||
|         permissionCheckService.verifyConnectionUpdateAccess(this.user_id, object.getIdentifier()); |         permissionCheckService.verifyConnectionUpdateAccess(this.user_id, object.getIdentifier()); | ||||||
|  |  | ||||||
|         // TODO: Rely on update() to be given MySQLConnection |         MySQLConnection mySQLConnection = (MySQLConnection) object; | ||||||
|         MySQLConnection mySQLConnection = |  | ||||||
|                 providerService.getExistingMySQLConnection(object); |  | ||||||
|  |  | ||||||
|         // Create database object for insert |         // Create database object for insert | ||||||
|         net.sourceforge.guacamole.net.auth.mysql.model.Connection connection = |         net.sourceforge.guacamole.net.auth.mysql.model.Connection connection = | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user