workflow_form_alter accessable by all users, this places the fieldset, buttons and comment box for workflow management into the node form, even when "Workflow tab permissions" has all permissions for roles disabled it still displays
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | workflow_author.patch.txt | 833 bytes | hutch |
Comments
Comment #1
jvandyk commentedThere seems to be a problem with checkboxes in line 622. Anonymous user stealth-selected itself on first edit of workflow permissions.
Comment #2
dgtlmoon commentedYep, im still trying to decide if that is the same bug tho hmmm
Comment #3
hutch commentedI noticed that table 'workflow_transitions', column 'roles' had entries like ',3' in it.
I was also getting 'may do these transitions:' with no role name, and all the transitions except for those involving author displayed.
Editing out the prepended comma solved that. When I removed all the transitions the table was cleared
and when I added them back they were inserted correctly.
So I'm assuming that this was a leftover from a previous bug where an array with an empty initial element was imploded, giving "nothing","number".
The workflow tab is still there though. The problem there lies in the code circa lines 90 - 100.
array_intersect($roles, $allowed_roles)gives 'author' even when the user role is anonymous, not logged inand with no access rights except 'access content'
how to fix it without breaking what it is supposed to do is the problem I'm trying to unravel now. ;-/
HTH
Comment #4
hutch commentedI have attached a proposed fix.
'author' only gets added to the
$rolesarray if$node->uid == $user->uidPlease test.
HTH
Comment #5
hutch commentedI forgot to set status ;-)
Comment #6
jvandyk commentedCommitted. Thanks.
Comment #7
(not verified) commented