GUACAMOLE-926: Improve response plumbing through to user.

This commit is contained in:
James Muehlner committed 2023-04-07 20:43:29 +00:00
1 parent 7d1d5cdf13
commit 9cdbe0fb36
12 files changed
+497 -30

No files matched your search

@@ -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