function media_browser_plus_file_download_access in Media Browser Plus 7
Same name and namespace in other branches
- 7.2 media_browser_plus.module \media_browser_plus_file_download_access()
Checks if the user has the permission to download a file.
Parameters
$field:
$entity_type:
$entity:
File
- ./
media_browser_plus.module, line 995 - Adds fields to the media browser forms for better UX
Code
function media_browser_plus_file_download_access($field, $entity_type, $entity) {
// Only check against media entities.
if ($entity_type == 'file') {
// Check for media admin AND return true if found.
return media_browser_plus_media_access($entity);
}
}