mike-jumper commented on a change in pull request #389: GUACAMOLE-708: Enable 
auto-creation of users in JDBC modules
URL: https://github.com/apache/guacamole-client/pull/389#discussion_r386142132
 
 

 ##########
 File path: 
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/user/SharedAuthenticatedUser.java
 ##########
 @@ -99,7 +102,57 @@ public String getIdentifier() {
 
     @Override
     public void setIdentifier(String identifier) {
-        throw new UnsupportedOperationException("Users authenticated via share 
keys are immutable.");
+        throw new UnsupportedOperationException(
+                "Users authenticated via share keys are immutable.");
+    }
+
+    @Override
+    public ObjectPermissionSet getActiveConnectionPermissions()
+            throws GuacamoleException {
+        throw new UnsupportedOperationException(
+                "Shared users do not have any assigned permissions.");
+    }
 
 Review comment:
   The `ObjectPermissionSet` representation of no permissions is an 
implementation of `ObjectPermissionSet` which returns no permissions, such as 
[`ObjectPermissionSet.EMPTY_SET`](http://guacamole.apache.org/doc/guacamole-ext/org/apache/guacamole/net/auth/permission/ObjectPermissionSet.html#EMPTY_SET).
   
   Retrieving user permissions is a common operation and needs to succeed. 
Throwing `UnsupportedOperationException` doesn't indicate that the user has no 
permissions, but rather that permission retrieval is not supported, and will 
cause an internal error whenever any part of the webapp attempts to retrieve 
the permissions of this user.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to