Force access denied on 'admin/structure/menu' for everyone except admin I need to write a "simple" feature in custom module which returns access denied for all the users except admin who tries to rich 'admin/structure/menu'. I've tried with hook_page_alter, hook_page_build and also with hook_menu_alter, but none of those functions work. Function hook_menu_alter is caching menus so it sets flag:

$items['admin/structure/menu']['access callback'] = FALSE

to all users and I (as admin) can't see this page also. Any help?
Menus are cached, but decision making functions aren't. So what you need is:

function MYMODULE_menu_alter(&amp;$items) {
  $items['admin/structure/menu']['access callback'] = 'MYMODULE_menu_admin_access';
}

function MYMODULE_menu_admin_access() {
  return $GLOBALS['user']-&gt;uid == 1; // Or whatever makes most sense for your use case.
}