diff --git a/workflow.module b/workflow.module index 96d63f0..9fa07ca 100644 --- a/workflow.module +++ b/workflow.module @@ -749,6 +749,14 @@ function workflow_execute_transition($node, $sid, $comment = NULL, $force = FALS if (empty($node->nid)) { return; } + + // Make sure this transition is allowed. + $result = module_invoke_all('workflow', 'transition permitted', $current_sid, $transition->state_id, $node); + // Did anybody veto this choice? + if (in_array(FALSE, $result)) { + // If vetoed, quit. + return; + } $old_sid = workflow_node_current_state($node);