Index: workflow.module =================================================================== --- workflow.module (revision 223) +++ workflow.module (working copy) @@ -449,7 +449,13 @@ // Make sure this transition is valid and allowed for the current user. global $user; - if ($user->uid > 1 || $user->uid == 0) { // allow any state change for superuser (might be cron) + + // If we are executing a cron job, we shouldn't check the permissions + // as cron is executed as a anonymous user but the transition can only be scheduled + // by an authorised user + $cron = $_SERVER['REQUEST_URI'] == base_path() . 'cron.php' ? TRUE : FALSE; + + if (($user->uid > 1 || $user->uid == 0) && !$cron) { // allow any state change for superuser and for cron $tid = workflow_get_transition_id($old_sid, $sid); if (!$tid) { watchdog('workflow', t('Attempt to go to nonexistent transition (from %old to %new)', array('%old' => $old_sid, '%new' => $sid), WATCHDOG_ERROR));