[drupal-devel] Working around node_access in node/add
Mark
mark at nullcraft.org
Mon Feb 14 05:34:45 UTC 2005
Gerhard Killesreiter wrote:
>>Thats's basically what I'm trying to do. I use a path of
>>node/add/$type/parent/$parent_nid, and only want to require certain
>>
>>
>
>Can't you use an entirely new path?
>
>create/$type/$parent for example.
>
>Then disable or hide node/add through menu.module.
>I agree that it is hackish but less hackish than what you proposed.
>
>
>
My main goal is to keep the nodes from showing up in the node/add list
and from being created . To additionally keep them out of the menu
would just be a bonus for me. I could just put in the README.txt for my
module that admins should remove these node types from the menu, but it
still wouldn't keep clever folks from hand-entering an inappropriate
node type and creating inconsistent node structures. I was attempting
to override the various node/add/$type paths to set the security on them
explicitly. This is not working, however.
I wish there were a way around this other than patching core modules,
but I have yet to see a way around it other than modifying
node_access('create',$type) to look elsewhere before invoking
hook_access('create',$type).
-Mark
More information about the drupal-devel
mailing list