You are here

function content_permissions_field_access in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 modules/content_permissions/content_permissions.module \content_permissions_field_access()

Implementation of hook_field_access().

See also

content_access().

File

modules/content_permissions/content_permissions.module, line 20

Code

function content_permissions_field_access($op, $field, $account, $node = NULL) {
  switch ($op) {
    case 'view':
    case 'edit':
      return user_access($op . ' ' . $field['field_name'], $account);
  }
  return TRUE;
}