[development] Menu Tree Access Control?
josh at chapterthree.com
Fri Apr 3 00:56:54 UTC 2009
Thanks for the tips, Moshe and Ryan!
First of all, I should have said before I definitely look to release
this as a compliment to menutrails module, so the development would
definitely see the light of day. There's some chance I could use
Taxonomy Access Control (or even TAC lite) for the use-case, but I
think there's some value in trying to allow this functionality based
on the menu tree.
It's very intuitive for non-technical content managers to manage menu
placement and to dole out access control based on these realms. If I
can figure out how to tie it together w/menutrails in a smart way, it
could be quite powerful and useful.
Overall, this puts me back into the place of wishing for a more
featureful, usable outlining system that combines much of book and
menu modules. Maybe a summer project for D7. ;)
On Thu, Apr 2, 2009 at 5:42 PM, Ryan Cross <drupal at ryancross.com> wrote:
> Hey Josh,
> I've had a similar need, but I was able to make taxonomy_access work for me.
> Not sure what your specs are, but it might be a reasonable thing to consider
> before building a custom module.
> On Fri, Apr 3, 2009 at 10:33 AM, Josh Koenig <josh at chapterthree.com> wrote:
>> Hey all,
>> I'm about to launch into yet another custom module build, and I wanted
>> to see if I'm missing the obvious and this thing already exists (or
>> has been somewhat built).
>> The use case is to allow access to nodes (node_access) based on their
>> placement within a drupal menu tree. Seems obvious, but keyword
>> searching through available modules didn't turn up anything that
>> seemed to match. I did locate the "Menu Subtree" module which seems to
>> provide some complimentary functionality in terms of restricting the
>> areas of a menu tree into which new nodes can be placed:
>> For access, it points to fago's menu_per_role module, but this is
>> about access to menu links, not node permissions. In the other
>> node-access modules, I didn't find one that seeks to allow/deny access
>> based on menu position. So that's what I'll begin working on.
>> Implementation seems fairly straightforward based on
>> hook_node_access_records() and hook_node_grants(). Assuming I'm right,
>> the next fun thing would be looking at integrating this with
>> menutrails.module so it can work for broader classes of nodes and not
>> just those placed directly into the menu tree.
>> Please let me know if I'm missing something obvious. :)
>> Josh Koenig, Partner & CTO
Josh Koenig, Partner & CTO
More information about the development