TreeLocation location = TreeLocation.create(immutableRoot, oakPath);
boolean isAcContent = acConfig.getContext().definesLocation(location);
long permissions = Permissions.getPermissions(jcrActions, location, isAcContent);
boolean isGranted = false;
PropertyState property = location.getProperty();
Tree tree = (property == null) ? location.getTree() : location.getParent().getTree();
if (tree != null) {
isGranted = isGranted(tree, property, permissions);
} else if (!isVersionStorePath(oakPath)) {
isGranted = compiledPermissions.isGranted(oakPath, permissions);