Removing the permission "change workflow state via node edit form" from a role doesn't actually remove the workflow fieldset from the node edit or creation form.

Comments

dbassendine’s picture

This is because in "workflow_extensions_form_alter", line 188 the code checks for ['#form-id'] = 'node-form'.

 // 2) Suppress Workflow fieldset on the create/edit form if not permitted.
  if (isset($form['#id']) && $form['#id'] == 'node-form' && !user_access('change workflow state via node edit form')) {
    unset($form['workflow']);
    return;
  }

The proper check is for isset($form['#node_edit_form']). I've attached a patch to correct this (against 7.x-1.0-alpha1).

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Patch (to be ported)

Thanks so much David.
The D6 to D7 port of the Workflow base module must have changed the name.
I hope to attend to this on the weekend.
Rik

rdeboer’s picture

Status: Patch (to be ported) » Fixed

Committed with attribution to 7.x-1.x-dev.
Thanks again, Dave.
Rik

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.