My site has a front page, an 'about us' and 'T&C' pages which are all created as 'basic page' types, and I want to allow anonymous users to access them. I have tried this hook below, but it does not seem to work because I am always redirected to the login page (using LoginToboggan if that matters).
function mymodule_node_access($node, $op, $account) {
$type = is_string($node) ? $node : $node->type;
if ($type == 'basic page' && $op == 'view') {
return NODE_ACCESS_ALLOW;
}
else {
return NODE_ACCESS_DENY;
}
return NODE_ACCESS_IGNORE;
}