You are here

function workbench_access_taxonomy_page_access in Workbench Access 7

Custom access callback for taxonomy/term/%.

Hide the vocabulary created by Workbench Access unless the user has specific permission to view these pages.

Parameters

$term: The taxonomy term being viewed.

Return value

Booelan TRUE or FALSE.

1 string reference to 'workbench_access_taxonomy_page_access'
workbench_access_menu_alter in ./workbench_access.module
Implements hook_menu_alter().

File

./workbench_access.module, line 168
Workbench Access module file.

Code

function workbench_access_taxonomy_page_access($term) {
  if (!user_access('access content') || $term->vocabulary_machine_name == 'workbench_access' && !user_access('view workbench taxonomy pages')) {
    return FALSE;
  }
  return TRUE;
}