You are here

function fillpdf_test_node_access in FillPDF 7

Implements hook_node_access().

File

tests/modules/fillpdf_test/fillpdf_test.module, line 11
FillPDF Testing module.

Code

function fillpdf_test_node_access($node, $op, $account) {
  if (is_string($node)) {
    $node = new stdClass();
    $node->type = $node;
  }
  if ($node->type !== 'page') {
    return NODE_ACCESS_IGNORE;
  }
  if (!empty($account->uid) && (int) $account->uid === 1) {
    return NODE_ACCESS_ALLOW;
  }
  return NODE_ACCESS_DENY;
}