You are here

function domain_node_access in Domain Access 7.3

Implements hook_node_access().

Splits the access checks by operation.

File

./domain.module, line 2271
Core module functions for the Domain Access suite.

Code

function domain_node_access($node, $op, $account) {
  domain_user_set($account);
  if (empty($account->domain_user)) {
    return NODE_ACCESS_IGNORE;
  }
  $function = "domain_node_access_{$op}";
  if (function_exists($function)) {
    $type = is_string($node) ? $node : $node->type;
    return $function($type, $node, $op, $account);
  }
  return NODE_ACCESS_IGNORE;
}