Program nodes that are unpublished can still be seen by any user, including anonymous users.
As far as I can tell, the problem is twofold.
First, hook_access adds a view case:
case 'view':
return user_access('access content');
break;
Second, it has a default case.
According to the comments in node.module (see * @defgroup node_access Node access rights), module implementations of this hook should return NULL.
If I remove the 'view' case, then the switch statement falls out with 'administer programs', which is wrong too.
One quick fix is to replace the 'view' case with this:
case 'view':
return NULL;
but it's not very elegant, as the view case should simply not appear in this hook as we're not trying to do anything different to what ordinary nodes do for the view case.
Comments
Comment #1
drewish commentedis this only a problem in the 1.2 release or does it affect later versions?
Comment #2
joachim commentedI can reproduce with a fairly recent CVS 5.x branch. I've not set up a D6 with this yet.
Comment #3
drewish commentedhow about this?
Comment #4
drewish commentedcommitted to HEAD.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.