function petreference_autocomplete_access in Previewable email templates 6
Check access to the menu callback of the autocomplete widget.
Check for both 'edit' and 'view' access in the unlikely event a user has edit but not view access.
1 string reference to 'petreference_autocomplete_access'
- petreference_menu in modules/
petreference/ petreference.module - Implementation of hook_menu().
File
- modules/
petreference/ petreference.module, line 885 - Defines a field type for referencing pet template to a node.
Code
function petreference_autocomplete_access($field_name) {
return user_access('access content') && ($field = content_fields($field_name)) && isset($field['field_name']) && content_access('view', $field) && content_access('edit', $field);
}