You are here

function _publishcontent_view_access in Publish Content 5.2

Same name and namespace in other branches
  1. 6 publishcontent.module \_publishcontent_view_access()
1 call to _publishcontent_view_access()
publishcontent_menu in ./publishcontent.module
Implementation of hook_menu().

File

./publishcontent.module, line 53
Add button to publish or unpublish a node, with access control based on the node type

Code

function _publishcontent_view_access($node) {
  return user_access('  publish *all* content') || user_access('unpublish *all* content') || user_access('  publish ' . check_plain($node->type) . ' content') || user_access('unpublish ' . check_plain($node->type) . ' content') || node_access('view', $node);
}