mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Merge pull request #179 from glyptodon/GUAC-1188
GUAC-1188 Use canReadPermissions() - do not reimplement permission checks
This commit is contained in:
@@ -151,9 +151,8 @@ public class SystemPermissionService
|
||||
public SystemPermission retrievePermission(AuthenticatedUser user,
|
||||
ModeledUser targetUser, SystemPermission.Type type) throws GuacamoleException {
|
||||
|
||||
// Only an admin can read permissions that aren't his own
|
||||
if (user.getUser().getIdentifier().equals(targetUser.getIdentifier())
|
||||
|| user.getUser().isAdministrator()) {
|
||||
// Retrieve permissions only if allowed
|
||||
if (canReadPermissions(user, targetUser)) {
|
||||
|
||||
// Read permission from database, return null if not found
|
||||
SystemPermissionModel model = getPermissionMapper().selectOne(targetUser.getModel(), type);
|
||||
|
Reference in New Issue
Block a user