GUAC-1126: Allow non-admins to see active connections if they have READ permission to those connections.
This commit is contained in:
1 parent
311d56bae5
commit
f8714b735f
5 files changed
+63
-62
No files matched your search
+2
-2
@@ -106,14 +106,14 @@ public class ActiveConnectionRESTService {
|
||||
if (permissions != null && permissions.isEmpty())
|
||||
permissions = null;
|
||||
|
||||
// An admin user has access to any user
|
||||
// An admin user has access to any connection
|
||||
SystemPermissionSet systemPermissions = self.getSystemPermissions();
|
||||
boolean isAdmin = systemPermissions.hasPermission(SystemPermission.Type.ADMINISTER);
|
||||
|
||||
// Get the directory
|
||||
Directory<ActiveConnection> activeConnectionDirectory = userContext.getActiveConnectionDirectory();
|
||||
|
||||
// Filter users, if requested
|
||||
// Filter connections, if requested
|
||||
Collection<String> activeConnectionIdentifiers = activeConnectionDirectory.getIdentifiers();
|
||||
if (!isAdmin && permissions != null) {
|
||||
ObjectPermissionSet activeConnectionPermissions = self.getActiveConnectionPermissions();
|
||||
|
||||
Reference in new issue
Block a user