Problem
I'm trying to block access to Drupal's taxonomy pages for anonymous users.
I'm using the solution set out in this answer, but for Drupal 7 rather than 6.
I'm using hook_menu_alter
and hook_permission
to create a new access argument for taxonomy pages. The permission is successfully created, but no matter what roles I tick the pages remain blocked. Any ideas what I'm doing wrong?
Example Code
function custom_module_menu_alter(&$items) {
$items['taxonomy/term/%']['access arguments'] = array('access taxonomy permission');
}
function custom_module_permission() {
return array(
'access taxonomy permission' => array(
'title' => t('Access taxonomy pages'),
)
);
}