The "Create a new draft from the published revision" link shouldn't be displayed in messages when the user doesn't have permission to transition to any states.

As an example, I have a "Lock Publishing" state which the draft state can be transitioned to, but there are no transitions from "Lock Publishing". I use this for for admins to be able to put a draft in the state so that editors can edit the draft, but can't change the state in order to publish a new revision. This works almost perfectly out of the box after configuring permissions correctly, except that there's a loophole for editors to get the "locked" draft out of the ""Lock Publishing" state. They can go to the "Edit draft" page and click the "Create a new draft from the published revision" in the messages which will actually succeed and kick the node out of the "locked" state.

It seems to me that this link should not be displayed if the user isn't able to transition the node at all. I've created the patch below to add a check before outputting the link.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bjmiller121’s picture

iamEAP’s picture

Issue summary: View changes
Status: Active » Needs review
delacosta456’s picture

hi @bjmiller121
Will your patch work for 7.3 dev branch

thanks