/**
* @see CompiledPermissions#canRead(Path, ItemId)
*/
public boolean canRead(Path path, ItemId itemId) throws RepositoryException {
ItemId id = (itemId == null) ? session.getHierarchyManager().resolvePath(path) : itemId;
/* currently READ access cannot be denied to individual properties.
if the parent node is readable the properties are as well.
this simplifies the canRead test as well as the caching.
*/
boolean existingNode = false;
NodeId nodeId;
if (id.denotesNode()) {
nodeId = (NodeId) id;
// since method may only be called for existing nodes the
// flag be set to true if the id identifies a node.
existingNode = true;
} else {