function node_file_download_access

7.x node.module node_file_download_access($field, $entity_type, $entity)

Implements hook_file_download_access().

File

drupal-7.x/modules/node/node.module, line 4170
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function node_file_download_access($field, $entity_type, $entity) {
  if ($entity_type == 'node') {
    return node_access('view', $entity);
  }
}