It might be worth noting that there is an issue under the CCK project that impacts users of module_grants that need to display data from a nodereferenced node.

The basic summary is that nodereference bypasses core node_access() for unpublished nodes, and only checks 'administer nodes' permissions when displaying nodereferenced fields' display data. This results in these fields not displaying, even when other modules that implement access functionality grant permissions. Unless the user has 'administer nodes', these grants are ignored and the 'module_grant'ed viewer is SOL.

There is a patch that changes the 'administer nodes' check to a check against core's node_access() function. If you've patched core to pass control to module_grants_node_access(), then this patch will fix the above issue. If you haven't then you might want to change the patch to nodereference.module to check against module_grants_node_access() directly instead of against core's node_access().

The issue and the patch for nodereference.module is here:

http://drupal.org/node/946554

Comments

RdeBoer’s picture

Version: » 6.x-3.6

Thanks for posting this iratau ! - Rik

RdeBoer’s picture

Title: Anomaly for nodereferenced fields within a CCK node » Fix for node-referenced fields within a CCK node

Changed title.