function formassembly_field_access in FormAssembly 7
Implements hook_field_access().
File
- ./
formassembly.module, line 256 - Contains hooks implementations and callbacks to non-admin pages.
Code
function formassembly_field_access($op, $field, $entity_type, $entity, $account) {
// We are only interested in controlling edit mode on Entity Reference
// fields that target Form Assembly entities...
if ($op == 'edit' && $field['type'] == 'entityreference' && $field['settings']['target_type'] == 'fa_form') {
return user_access('reference formassembly');
}
}