Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2010 at 17:01 UTC
Updated:
15 Feb 2012 at 14:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
jhodgdonI see where that security announcement says that access callbacks are not inherited. Presumably this is true in D7 as well, and the doc should be fixed there first.
I would like to see someone verify in the menu building code that this fix is still in effect before we change the doc though.
Comment #2
jhodgdonUpdating title. Still needs to be investigated for D7 and D6, to verify whether the doc is correct or not (the doc says access callbacks are inherited).
Comment #3
jhodgdonAnother note: the menu system topic/group (which is located at the top of menu.inc) also says that access callbacks are inherited. So if this is wrong, we need to fix it there too.
In Drupal 7, it looks like access callbacks are inherited, but only for MENU_DEFAULT_LOCAL_TASK items. Here's the relevant code from _menu_router_build():
This is identical in Drupal 6 as well, and is explained here (the change was made in **Drupal 6.2** and this has been wrong in the documentation since then!): http://drupal.org/node/244569
So the doc does need an update... here's a patch. If accepted, it also needs to be ported to Drupal 6.x.
Comment #4
moshe weitzman commentedLooks good. Please move to d6 after commit.
Comment #5
webchickCommitted to HEAD. Thanks!
Comment #6
jhodgdonPatch should be ported now to D6, which works exactly the same.
Comment #7
webchickSorry. I meant to do that, had a brain-fart.
Comment #8
albert volkman commentedSmall D6 patch :)
Comment #9
jhodgdonThanks! That patch looks good for Drupal 6.
We also need a patch for that fixes up the hook_menu() example (in D6, hook docs are in the Documentation project repository). If you are interested in doing that, you could attach it here -- just give it a file name that will make the test bot ignore it (see note below the Attach new file field when you attach the file).
Comment #10
albert volkman commentedIt looks like the hunks for system.api.php are already in developer/hooks/core.php in the documentation project. Refs-
http://drupalcode.org/project/documentation.git/blob/refs/heads/6.x-1.x:...
http://drupalcode.org/project/documentation.git/blob/refs/heads/6.x-1.x:...
Unless I'm misunderstanding the need?
Comment #11
jhodgdonCorrect, sorry I just assumed without actually checking. Thanks!
Comment #12
albert volkman commentedNo prob at all!
Comment #13
gábor hojtsySuperb, committed, pushed.