You are here

function panels_node_access in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_node/panels_node.module \panels_node_access()
  2. 6.3 panels_node/panels_node.module \panels_node_access()

Implementation of hook_access().

File

panels_node/panels_node.module, line 140
panels_node.module

Code

function panels_node_access($op, $node = NULL) {
  if (user_access('administer panel-nodes')) {
    return TRUE;
  }
  if ($op == 'create' && user_access('create panel-nodes')) {
    return TRUE;
  }
  if ($op == 'update' && $node->uid == $user->uid && user_access('edit own panel-nodes')) {
    return TRUE;
  }
}