function nodereference_autocomplete_access in Content Construction Kit (CCK) 6.2
Same name and namespace in other branches
- 6.3 modules/nodereference/nodereference.module \nodereference_autocomplete_access()
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 'nodereference_autocomplete_access'
- nodereference_menu in modules/
nodereference/ nodereference.module - Implementation of hook_menu().
File
- modules/
nodereference/ nodereference.module, line 973 - Defines a field type for referencing one node from another.
Code
function nodereference_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);
}