function _taxonomy_resource_delete_access in Services 7.3
Access callback for term deleting.
Parameters
$term: An taxonomy term object
Return value
Boolean whether or not the user has access to delete the term.
1 string reference to '_taxonomy_resource_delete_access'
- _taxonomy_resource_definition in resources/
taxonomy_resource.inc - @file Link general taxonomy functionalities to services module.
File
- resources/
taxonomy_resource.inc, line 621 - Link general taxonomy functionalities to services module.
Code
function _taxonomy_resource_delete_access($tid) {
$term = taxonomy_term_load($tid);
if (!$term) {
return services_error(t('There is no term with id @tid.', array(
'@tid' => $tid,
)), 406);
}
return user_access('delete terms in ' . $term->vid) || user_access('administer taxonomy');
}