function state_flow_menu_node_access in State Machine 7
Same name and namespace in other branches
- 7.3 modules/state_flow/state_flow.module \state_flow_menu_node_access()
- 7.2 modules/state_flow/state_flow.module \state_flow_menu_node_access()
Menu access callback for accessing the node workflow pages.
3 calls to state_flow_menu_node_access()
- state_flow_access in modules/
state_flow/ state_flow.module - Determine whether a user has permission to transition a node with an event.
- state_flow_events_revisions_access in modules/
state_flow/ state_flow.module - Menu access callback for the node revision workflow transition page.
- state_flow_handler_field_workflow_link::render in modules/
state_flow/ includes/ views/ state_flow_handler_field_workflow_link.inc - Render the field.
1 string reference to 'state_flow_menu_node_access'
- state_flow_menu in modules/
state_flow/ state_flow.module - Implements hook_menu().
File
- modules/
state_flow/ state_flow.module, line 229 - An implementation of node revision workflow for Drupal based on the State Machine system.
Code
function state_flow_menu_node_access($node, $account = NULL) {
global $user;
// If no user account is given, then use the current user.
if (empty($account)) {
$account = $user;
}
// If the user has the "manage content workflow" permission, then allow access
// to workflow pages.
$access = user_access('manage content workflow', $account);
// Allow other modules to alter this decision
drupal_alter('state_flow_menu_node_access', $access, $node, $account);
return $access;
}