GUACAMOLE-926: Improve response plumbing through to user.

This commit is contained in:
James Muehlner
2023-01-23 23:40:48 +00:00
parent 7d1d5cdf13
commit 9cdbe0fb36
12 changed files with 497 additions and 30 deletions

View File

@@ -68,8 +68,19 @@ public class ConnectionDirectory extends JDBCDirectory<Connection> {
@Override
@Transactional
public void update(Connection object) throws GuacamoleException {
ModeledConnection connection = (ModeledConnection) object;
connectionService.updateObject(getCurrentUser(), connection);
// If the provided connection is already an internal type, update
// using the internal method
if (object instanceof ModeledConnection) {
ModeledConnection connection = (ModeledConnection) object;
connectionService.updateObject(getCurrentUser(), connection);
}
// If the type is not already the expected internal type, use the
// external update method
else {
connectionService.updateExternalObject(getCurrentUser(), object);
}
}
@Override