access control problem

checkerboard - September 28, 2007 - 06:05

HI guys I am really having a serious access control problem

Suppose I have a certain static path like this(with $may_cache set to true)

path => 'node/add/product/agriculture',
access => return true
............................
..........................(with other options)

Now I am overriding the above path with a dynamic menu(with $may_cache set to false)
path => 'node/add/product/agriculture',
access => false
.........................
.......................(with other options)

I think that the overriding menu path should not have given access to the page but it is.Why is it so??
Actually what I want to do is override the menu and allow the page to display only if a parameter is passed with the url like
node/add/product/agriculture/3 where 3 is the taxonomy term
All other visits to the url node/add/product/agriculture should return false until and unless a taxonomy term is given,

Now the first one given in the above two is defined in another module and I don't want to change it,but override it with my own.But it's not working.How can I do it.

Seeking for help

Upgrade to Drupal 6?

dwees - September 28, 2007 - 06:54

In Drupal 6, there is a complete overhaul to the menu system and this problem is handled as they define a new hook, 'hook_menu_item_alter' I think it is is called.

I don't know how to over-write another menu item. Maybe make sure your module has a higher weight than the other module so it is called afterwards?

Dave

My site: http://www.unitorganizer.com/myblog

 
 

Drupal is a registered trademark of Dries Buytaert.