function taxonomy_tools_overview_access in Taxonomy Tools 8
Same name and namespace in other branches
- 7 taxonomy_tools.module \taxonomy_tools_overview_access()
Controls access to Taxonomy Tools overview page.
Return value
bool TRUE if the vocabulary uses at least one of Taxonomy Tools sub-modules and user has permission to access Taxonomy Tools overview page; FALSE otherwise.
2 calls to taxonomy_tools_overview_access()
- taxonomy_tools_overview in ./
taxonomy_tools.admin.inc - Build taxonomy overview form.
- theme_taxonomy_tools_overview in ./
taxonomy_tools.admin.inc - Returns HTML for a taxonomy overview form as a table.
1 string reference to 'taxonomy_tools_overview_access'
- taxonomy_tools_menu in ./
taxonomy_tools.module - Implements hook_menu().
File
- ./
taxonomy_tools.module, line 459 - Drupal hooks and functions to work with taxonomy terms.
Code
function taxonomy_tools_overview_access($vocabulary, $add = NULL) {
$access = FALSE;
$access = user_access('use taxonomy tools');
if ($access && $add && !(user_access('administer taxonomy') || user_access('edit terms in ' . $vocabulary->vid))) {
$access = FALSE;
}
return $access;
}