[drupal-devel] Working around node_access in node/add

Mark mark at nullcraft.org
Sat Feb 12 21:52:39 UTC 2005


Moshe Weitzman wrote:

>
> 2. Add another pass to the nodeapi hook for "access" that lets modules 
> restrict access to specific nodes on a situational basis.  This could 
> be called from node_access().  I think this would address my needs.
>
> -1. Consider the case when we are retrieving a list of nodes. We don't 
> want to call a hook against every single node we've retrieved. We want 
> to retrieve only the right nodes in SQL. That is the whole point of 
> the node_access table.

I'm looking to further restrict access using the node_access table as 
well.  I only want to allow the creation of certain node types if  1) 
they don't require a parent to exist or 2) I can tell from the query 
params/environment/etc which node is the parent.  Failing both of these, 
I don't want them to appear on the "create content" list.

Can you think oa another way to do this?

Thanks,
-Mark



More information about the drupal-devel mailing list