hook_node_view selectively responding I have inherited a complex site with multiple node type.

My current task is to prevent some nodes from loading based on some preset conditions. To accomplish that I used hook_node_view in the following function:

function accessibility_node_view($node, $view_mode, $langcode){
    drupal_set_message('Node View Responding'); 
}


That's just a simple test but I find that code responds on some nodes types but not on others.

Does anyone know a reason why that would be happening, please?
After a long and confusing time experimenting with a lot of various hooks, I finally found hook_node_access.

I'm not sure if I had tried it previously but it seems to do the trick.

I used the following code to test when any node of any type is being viewed at which point I test for the presence of an particular taxonomy and value to determine if I want certain roles to view and read the page:

function mymodule_node_access($node, $op, $account){
    if($op == 'view'){
        if( isset($node-&gt;field_accessibility['und'][0]) ){
            ....
        }
    }
}


I hope that helps @longboardnode