Github user necouchman commented on a diff in the pull request:
https://github.com/apache/guacamole-client/pull/301#discussion_r194937148
--- Diff:
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/activeconnection/ActiveConnectionService.java
---
@@ -110,21 +110,21 @@ public TrackedActiveConnection
retrieveObject(ModeledAuthenticatedUser user,
@Override
public void deleteObject(ModeledAuthenticatedUser user, String
identifier)
throws GuacamoleException {
-
- // Only administrators may delete active connections
- if (!user.getUser().isAdministrator())
- throw new GuacamoleSecurityException("Permission denied.");
-
+
// Close connection, if it exists (and we have permission)
ActiveConnection activeConnection = retrieveObject(user,
identifier);
- if (activeConnection != null) {
+ if (activeConnection != null &&
+ (user.getUser().isAdministrator()
+ ||
user.getIdentifier().equals(activeConnection.getUsername()))) {
--- End diff --
> Also, not sure if there is anywhere in the JS code that I should modify
to make use of these permisisons...
Updated the JS code to only show session management if the permission
exists. Answered my own question.
---