Merge pull request #292 from glyptodon/GUAC-1391

GUAC-1391: Skip readable check when listing active sessions for system administrators
This commit is contained in:
Mike Jumper
2015-12-02 20:19:54 -08:00

View File

@@ -468,6 +468,10 @@ public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelS
if (records.isEmpty()) if (records.isEmpty())
return Collections.<ActiveConnectionRecord>emptyList(); return Collections.<ActiveConnectionRecord>emptyList();
// A system administrator can view all connections; no need to filter
if (user.getUser().isAdministrator())
return records;
// Build set of all connection identifiers associated with active tunnels // Build set of all connection identifiers associated with active tunnels
Set<String> identifiers = new HashSet<String>(records.size()); Set<String> identifiers = new HashSet<String>(records.size());
for (ActiveConnectionRecord record : records) for (ActiveConnectionRecord record : records)