Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.815 diff -u -r1.815 node.module --- modules/node/node.module 19 May 2007 13:31:51 -0000 1.815 +++ modules/node/node.module 20 May 2007 02:33:31 -0000 @@ -2721,6 +2721,18 @@ return FALSE; } + // Check nodeapi 'access' hook. + // This happens before the module's own hook so that nodeapi can perform + // overrides. + $access = node_invoke_nodeapi($node, 'access', $op); + // node_invoke_nodeapi drops NULLs; so if no nodeapi actually responded + // to this, we'll have an empty return value, which means nothing cares + // and we move on. + if (!empty($access) && is_array($access)) { + // If any values were true, return true; otherwise, return false. + return (bool) array_filter($access); + } + // Can't use node_invoke(), because the access hook takes the $op parameter // before the $node parameter. $module = node_get_types('module', $node);