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

Bèr Kessels berdrupal at tiscali.be
Fri Feb 11 09:51:01 UTC 2005


Mark,

two small things: 
Did you look at my clipper.module. It does node relations already.
It is a pity you did not post anything about node relations earlier, for i am 
in need of extending or even rewriting clipper. module, to have more advanced 
relations. But it might not be too late yet. :)

Bèr

Op vrijdag 11 februari 2005 03:10, schreef Mark:
> Hello drupal-devel,
>
> Lately, I've been working on the Node Relativity module, and I've come
> up against some issues that I'm having trouble overcoming.  The main
> thing this module does is allow parent/child relationships to exist
> between nodes.  One of the features of this module is the ability to
> require that a given type of node not exist unless it is a child of an
> appropriate parent node.  This works all well and good from within the
> module (except for the occasional bug), but when a user goes to the
> "create content" page (node/add), they see listed before them every type
> of node that they have permission to create.  I want to limit this view
> and the menu associated with it.
>
> This brings me to my question: How do I override what is displayed on
> the node/add page or override the node_access permissions in general for
> node types not defined by my module?  I know that node.module checks
> node_list() and calls node_access('create',$node) on each of the node
> types to see if the current user has rights to create it.  I suspect
> that there's some way that I haven't seen yet that the node is mapped
> back to the module that defines it.  I would like to restrict this view
> even further such that users can create these nodes, but only under the
> appropriate circumstances.
>
> Any ideas would be greatly appreciated.
>
> Thanks,
> Mark Howell
> (javanaut)
Bèr
-- 
| Bèr Kessels | webschuur.com | website development |
| Turnhoutsebaan 34/3 | 2140 Antwerpen | België |
| IM: ber at jabber.org.uk | MSN: berkessels at gmx.net |
| pers: bler.webschuur.com | prof: www.webschuur.com |



More information about the drupal-devel mailing list