I have a node which references other nodes.
If I give a user custom access to this node, how do I set it up so that he automatically gets access to those other nodes as well?
I have a node which references other nodes.
If I give a user custom access to this node, how do I set it up so that he automatically gets access to those other nodes as well?
If you are looking to build your own access-module, this piece of API documentation is probably the only place that has somewhat decent documentation on what to look at/for.
Your own custom work will come in on http://api.drupal.org/api/drupal/developer--examples--node_access_example--node_access_example.module/6
and the _update
equivalent. On these hooks/callbacks, you must not only insert the current GRANT, but GRANTS for all the referenced nodes too.
You probably want to try http://drupal.org/project/nodeaccess_nodereference
Maybe even http://drupal.org/project/nodeaccess_autoreference is useful (though I'm a bit confused about the module from its decription)