function lingotek_access_dev_tools in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_access_dev_tools()
- 7.2 lingotek.module \lingotek_access_dev_tools()
- 7.4 lingotek.util.inc \lingotek_access_dev_tools()
- 7.5 lingotek.util.inc \lingotek_access_dev_tools()
- 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.util.inc, line 405 - Utility functions.
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
// OR when not Enterprise
$user_access = user_access($permission);
if ($user_access && module_exists('entity_translation') && entity_translation_node_supported_type($node->type) && !lingotek_node_pushed($node) || !LingotekAccount::instance()
->isEnterprise()) {
return FALSE;
}
// Default: Standard user access
return $user_access;
}