Closed (fixed)
Project:
Workflow
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2011 at 13:45 UTC
Updated:
23 Nov 2011 at 15:16 UTC
The error is in the workflow.module (line 689).
if (!workflow_transition_allowed($tid, array_merge(array_keys($user->roles), array('author')))) {
nedds to be changhed in
if (!workflow_transition_allowed($sid, array_merge(array_keys($user->roles), array('author')))) {
$tid becomes $sid.
If not, only admin may change the state .
Comments
Comment #1
Bastlynn commentedGiven how that function is used, I don't think switching from tid to sid is going to solve anything. tid is the transition id, sid is the state id and that function is specifically checking if the transition is allowed. We check for allowed transitions in that function not allowed states. (Workflow_access is the module to check access for view / edit/ delete against state.)
I'll double check my set up with anon-admin user to be sure we're allowing user transition properly though, in case there's another cause behind what you're seeing.
Comment #2
Bastlynn commentedI think I found what you're seeing, it actually traced higher up the chair to line 689, where we needed to pass, not $tid, but $transition->tid. The change is in on 7.x - thanks!
Comment #3
vitoabrusci commentedPerfect, I've tested and now it's ok.
;-)