function _file_resource_node_access in Services 7.3
Same name and namespace in other branches
- 6.3 resources/file_resource.inc \_file_resource_node_access()
File
- resources/
file_resource.inc, line 397 - File resource.
Code
function _file_resource_node_access($op = 'view', $args = array()) {
global $user;
if (user_access('get any binary files')) {
return TRUE;
}
elseif ($node = node_load($args[0])) {
return $node->uid == $user->uid && user_access('get own binary files');
}
return FALSE;
}