You are here

function restful_test_node_access in RESTful 7

Same name and namespace in other branches
  1. 7.2 tests/modules/restful_test/restful_test.module \restful_test_node_access()

Implements hook_node_access().

File

tests/modules/restful_test/restful_test.module, line 37
Helper module for testing the RESTful module.

Code

function restful_test_node_access($node, $op, $account) {
  if (!($nid = variable_get('restful_test_deny_access_node'))) {
    return;
  }
  if ($op != 'view') {
    return;
  }
  if ($node->nid != $nid) {
    return;
  }

  // Deny access.
  return NODE_ACCESS_DENY;
}