function workbench_moderation_node_access in Workbench Moderation 7.3
Same name and namespace in other branches
- 8.2 workbench_moderation.module \workbench_moderation_node_access()
- 8 workbench_moderation.module \workbench_moderation_node_access()
- 7 workbench_moderation.module \workbench_moderation_node_access()
- 7.2 workbench_moderation.module \workbench_moderation_node_access()
Implements hook_node_access().
Allows users with the 'view all unpublished content' permission to do so.
File
- ./
workbench_moderation.module, line 444 - Content moderation for Workbench.
Code
function workbench_moderation_node_access($node, $op, $account) {
if ($op == 'view' && !$node->status && user_access('view all unpublished content', $account)) {
return NODE_ACCESS_ALLOW;
}
return NODE_ACCESS_IGNORE;
}