function _taxonomy_resource_update_access in Services 7.3
Access callback for term updating.
Parameters
$term: An taxonomy term object
Return value
Boolean whether or not the user has access to create or edit the term.
1 string reference to '_taxonomy_resource_update_access'
- _taxonomy_resource_definition in resources/
taxonomy_resource.inc - @file Link general taxonomy functionalities to services module.
File
- resources/
taxonomy_resource.inc, line 586 - Link general taxonomy functionalities to services module.
Code
function _taxonomy_resource_update_access($tid, $term) {
// Adds backwards compatability with regression fixed in #1083242
$term = _services_arg_value($term, 'term');
$term = (object) $term;
if (!isset($term->vid)) {
return services_error(t('Term object needs vid property.'), 406);
}
return user_access('edit terms in ' . $term->vid) || user_access('administer taxonomy');
}