protected boolean canUpdateModifiedParents(ModeledAuthenticatedUser user,
            String identifier, ModelType model) throws GuacamoleException {

        // If user is privileged, no need to check
        if (user.isPrivileged())
            return true;
        
        // Verify that we have permission to modify any modified parents
        Collection<String> modifiedParents = getModifiedParents(user, identifier, model);
        if (!modifiedParents.isEmpty()) {

            ObjectPermissionSet permissionSet = getParentEffectivePermissionSet(user);
            Collection<String> updateableParents = permissionSet.getAccessibleObjects(
                Collections.singleton(ObjectPermission.Type.UPDATE),
                modifiedParents
            );

            return updateableParents.size() == modifiedParents.size();
            
        }

        return true;

    }
Returns whether the given user has permission to modify the parents
affected by the modifications made to the given model object.

@param user
    The user who changed the model object.

@param identifier
    The identifier of the object that has been modified, if it exists.
    If the object is being created, this will be null.

@param model
    The model that has been modified, if any. If the object is being
    deleted, this will be null.

@return
    true if the user has update permission for all modified parents,
    false otherwise.

@throws GuacamoleException
    If an error occurs while determining which parents are affected.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ModeledChildDirectoryObjectService.java