GUACAMOLE-360: Update active connection permission check to support user groups.
This commit is contained in:
1 parent
658ce78846
commit
ad937defa6
1 file changed
+1
-1
+1
-1
@@ -97,7 +97,7 @@ public class ActiveConnectionPermissionService
|
|||||||
permissions.add(new ObjectPermission(ObjectPermission.Type.READ, identifier));
|
permissions.add(new ObjectPermission(ObjectPermission.Type.READ, identifier));
|
||||||
|
|
||||||
// If we're an admin, or the connection is ours, then we can DELETE
|
// If we're an admin, or the connection is ours, then we can DELETE
|
||||||
if (isAdmin || targetUser.getIdentifier().equals(record.getUsername()))
|
if (isAdmin || (targetEntity.isUser() && targetEntity.getIdentifier().equals(record.getUsername())))
|
||||||
permissions.add(new ObjectPermission(ObjectPermission.Type.DELETE, identifier));
|
permissions.add(new ObjectPermission(ObjectPermission.Type.DELETE, identifier));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user