function hosting_task_node_access in Hosting 7.4
Same name and namespace in other branches
- 7.3 task/hosting_task.module \hosting_task_node_access()
Implements hook_node_access().
File
- task/
hosting_task.module, line 417 - Web server node type is defined here.
Code
function hosting_task_node_access($node, $op, $account) {
if (hosting_feature('client')) {
// We rely on hosting_client_node_grants() instead of global configuration.
return NODE_ACCESS_IGNORE;
}
$type = is_string($node) ? $node : $node->type;
if ($type != 'task') {
return NODE_ACCESS_IGNORE;
}
if (user_access('administer tasks', $account)) {
return NODE_ACCESS_ALLOW;
}
}