You are here

function node_service_view_access in Services 7

Same name and namespace in other branches
  1. 5 services/node_service/node_service.module \node_service_view_access()
  2. 6.2 services/node_service/node_service.inc \node_service_view_access()

Check if the user has the permission to get the node's formated data thru services.

Parameters

$nid: Number. The node ID.

Return value

Boolean. TRUE if the user has the permission to get the node's data thru services.

1 string reference to 'node_service_view_access'
node_service_service in services/node_service/node_service.module
Implementation of hook_service().

File

services/node_service/node_service.inc, line 77
@author Services Dev Team

Code

function node_service_view_access($nid) {
  global $user;
  $node = node_load($nid);
  return node_access('view', $node) && user_access('load node data');
}