You are here

function lingotek_access_dev_tools in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_access_dev_tools()
  2. 7.3 lingotek.util.inc \lingotek_access_dev_tools()
  3. 7.4 lingotek.util.inc \lingotek_access_dev_tools()
  4. 7.5 lingotek.util.inc \lingotek_access_dev_tools()
  5. 7.6 lingotek.util.inc \lingotek_access_dev_tools()
1 string reference to 'lingotek_access_dev_tools'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.module, line 439

Code

function lingotek_access_dev_tools($node, $permission) {

  // Special case:  hide the Lingotek Developer Tools when the node is managed by entity translation and has not been pushed to Lingotek
  $user_access = user_access($permission);
  if (module_exists('entity_translation') && entity_translation_node_supported_type($node->type) && $user_access && !lingotek_node_pushed($node)) {
    return FALSE;
  }

  // Default: Standard user access
  return user_access($permission);
}