I am trying to do a little node access by node types
This is actually an extension to a question I posted earlier node/40616, but this question is substantially different, so I thought I should create another thread.
So here's my story...
I was able to create a simple node type and in my implemenation of hook_access I have the following
if ($op == 'view') {
if (user_access('view committees')) {
return True;
}
else {
return False;
}
}
I also have the same permission listed in my implementation of hook_perm.
I have a role 'Committee Members' and have the permission checked for appropriate users. If one is logged in as a 'Committee Member' the full node can be viewed, but otherwise the 'access denied' message is displayed. The problem I am having is that I would like to use the tracker module to list 'recent posts', but when I enable it, all posts are listed to all users, and I would like for the 'Committee' posts to only show for users with the 'view committees' permission.
I had initially thought that if I could avoid using one of the various node access modules and just find a function or piece of code that would run some SQL which would reference the node->type field in the node table such as a WHERE node.type NOT IN ('committee')
then I would be in really good shape.