You are here

function nodesinblock_nodequeue_access in Nodes In Block 6

Same name and namespace in other branches
  1. 7 nodesinblock.module \nodesinblock_nodequeue_access()

Access callback: check that user has access to configure nodes in block queue.

Parameters

stdClass $node The current node.:

Return value

TRUE or FALSE

1 string reference to 'nodesinblock_nodequeue_access'
nodesinblock_menu in ./nodesinblock.module
Implementation of hook_menu().

File

./nodesinblock.module, line 258
Nodes in block makes it possible to add multiple nodes in one block.

Code

function nodesinblock_nodequeue_access($node) {
  _nodeisblock_load($node);
  $saved_types = variable_get('nodesinblock_contenttypes', array());
  if (node_access('update', $node) && user_access('administer nodes in block queue') && isset($node->nodesinblock) && isset($saved_types[$node->type]) && $saved_types[$node->type] != '0') {
    return TRUE;
  }
  return FALSE;
}