You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/06/20 18:02:30 UTC
[07/12] guacamole-client git commit: GUACAMOLE-360: deleteObject
method should follow documented behavior.
GUACAMOLE-360: deleteObject method should follow documented behavior.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/6a1b55a3
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/6a1b55a3
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/6a1b55a3
Branch: refs/heads/master
Commit: 6a1b55a32708505c146b14a07010d897504ff1ca
Parents: d2b40e4
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Jun 18 19:15:20 2018 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jun 18 19:15:20 2018 -0400
----------------------------------------------------------------------
.../auth/jdbc/activeconnection/ActiveConnectionService.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6a1b55a3/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
index b82adb8..1d3344d 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
@@ -115,8 +115,10 @@ public class ActiveConnectionService
// Close connection, if it exists and we have permission
ActiveConnection activeConnection = retrieveObject(user, identifier);
- if (activeConnection != null
- && hasObjectPermissions(user, identifier, ObjectPermission.Type.DELETE)) {
+ if (activeConnection == null)
+ return;
+
+ if (hasObjectPermissions(user, identifier, ObjectPermission.Type.DELETE)) {
// Close connection if not already closed
GuacamoleTunnel tunnel = activeConnection.getTunnel();