function gdpr_tasks_file_download_access in General Data Protection Regulation 7
Implements hook_file_download_access().
File
- modules/
gdpr_tasks/ gdpr_tasks.module, line 950 - Module file for the GDPR Tasks module.
Code
function gdpr_tasks_file_download_access($file_item, $entity_type, $entity) {
if ($entity_type === 'gdpr_task') {
global $user;
return $entity->user_id == $user->uid && user_access('view own gdpr tasks') || user_access('view gdpr tasks');
}
}