You are here

function node_accessibility_access_accessibility_tab in Node Accessibility 7

Checks if user can access the accessibility tab.

Parameters

object $node: A node object whose access is to be returned.

Return value

bool TRUE if user can make conversions using this type, FALSE otherwise.

1 string reference to 'node_accessibility_access_accessibility_tab'
node_accessibility_menu in ./node_accessibility.module
Implements hook_menu().

File

./node_accessibility.module, line 221
Module file for the node accessibility project.

Code

function node_accessibility_access_accessibility_tab($node) {
  $access = FALSE;
  if (!is_object($node)) {
    if (class_exists('cf_error')) {
      cf_error::invalid_object('node');
    }
    return $access;
  }
  if (node_access('view', $node)) {
    $access = user_access('access node accessibility tab');
    if ($access && node_accessibility_is_enabled($node->type)) {
      $access = TRUE;
    }
    else {
      $access = FALSE;
    }
  }
  return $access;
}