I have made a modification to my permissions scheme (using node.module and nodeapis from OG and TAC modules) so that organic group and taxonomy access permissions work together. Node content is protected correctly now, but users can still list content they do not have access to. I'm told that I need to modify db_rewirte_sql(). Here is the blub from the node.module node_access function preamble:
* In node listings, the process above is followed except that
* hook_access() is not called on each node for performance reasons and for
* proper functioning of the pager system. When adding a node listing to your
* module, be sure to use db_rewrite_sql() to add
* the appropriate clauses to your query for access checks.
Is there some sort of tutorial on using/modifying db_rewrite_sql() for access checks? The Drupal API documentation is as cryptic as it gets, and there is apparently a lot about this I need to know before monkeying around. Thanks for any help.
Comments
Drupal Dojo
I'm planning a lesson on node access and the SQL rewriting (which will cover hook_db_rewrite_sql() and db_rewrite_sql()) in a future Drupal Dojo lesson (coming soon).
Looking forward to it, I've
Looking forward to it, I've been curious about how to use that hook and function.
It's here, and I found it helpful
It's here: http://groups.drupal.org/node/3307
I found it quite helpful in at least coming up with a way to use db_rewrite_sql to actually limit the content that is listed.
Organic Groups & Taxonomy Access Module compatible?
So did you find a simple way so you can install and run both Organic Groups and Taxonomy Access Modules?
I'm still not clear if both are OK to run together in Drupal 5 or not... and if not, what needs to be done to make them compatible.
Thanks