You are here

function entity_file_download_access in Entity API 7

Implements hook_file_download_access() for entity types provided by the CRUD API.

File

./entity.module, line 1164

Code

function entity_file_download_access($field, $entity_type, $entity) {
  $info = entity_get_info($entity_type);
  if (in_array('EntityAPIControllerInterface', class_implements($info['controller class']))) {
    return entity_access('view', $entity_type, $entity);
  }
}