You are here

function _file_resource_node_access in Services 6.3

Same name and namespace in other branches
  1. 7.3 resources/file_resource.inc \_file_resource_node_access()

File

resources/file_resource.inc, line 375
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;
}