function file_service_get_node_files_access in Services 6
Same name and namespace in other branches
- 6.2 services/file_service/file_service.inc \file_service_get_node_files_access()
- 7 services/file_service/file_service.inc \file_service_get_node_files_access()
Check if the user has permission to get all files from a given node.
1 string reference to 'file_service_get_node_files_access'
- file_service_service in services/
file_service/ file_service.module - Implementation of hook_service().
File
- services/
file_service/ file_service.inc, line 88 - @author Services Dev Team
Code
function file_service_get_node_files_access($nid) {
global $user;
if (user_access('get any binary files')) {
return TRUE;
}
elseif ($node = node_load($nid)) {
return $node->uid == $user->uid and user_access('get own binary files');
}
}