I'm building a Drupal site, and have added two custom menus to give two different groups of management links (some people will see one menu or the other, some will see both, and anonymous/low-level users will see neither).
The problem is, at the moment, all users can see the menus (but the menu items are not visible).
I'm trying to create a simple permissions module - and have created the administration forms which specify which menus are viewable by which role.
But I can't find a hook which lets me override the visibility of a particular menu - only the items.
So, how do I limit access to menu by role in Drupal now that I have a list of permissions in the database?
--
I have looked at Menu per Role and Menu Access. Unfortunately, these work at the item level and not on the menus directly.
I've come up with a solution - instead of using the auto-generated menu blocks for display, I've created a single block and put the following code in my module:
This seems to work fine.