protected boolean hasObjectPermission(ModeledAuthenticatedUser user,
            String identifier, ObjectPermission.Type type)
            throws GuacamoleException {

        // Get object permissions
        ObjectPermissionSet permissionSet = getEffectivePermissionSet(user);
        
        // Return whether permission is granted
        return user.isPrivileged()
            || permissionSet.hasPermission(type, identifier);

    }
Returns whether the given user has permission to perform a certain
action on a specific object managed by this directory object service,
taking into account permission inheritance through user groups.

@param user
    The user being checked.

@param identifier
    The identifier of the object to check.

@param type
    The type of action that will be performed.

@return
    true if the user has object permission relevant described, false
    otherwise.

@throws GuacamoleException
    If permission to read the user's permissions is denied.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledDirectoryObjectService.java