Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Most sites have some sort of a "content admin" or "content manager" role. The list of available permissions for all available workflow transitions can get quite large (similar to that of per node-type operation permissions).
Proposed resolution
Add a single permission that grants access to available transitions.
The access check in StateTransitionValidation::getValidTransitions() can check for this permission and skip the individual permission checks.
Remaining tasks
Write a patch.
Comment | File | Size | Author |
---|---|---|---|
#11 | 2922266-10.patch | 2.28 KB | bhanuprakashnani |
#9 | 2922266-7.patch | 2.46 KB | bhanuprakashnani |
#5 | 2922266-5.patch | 66.98 KB | bhanuprakashnani |
#3 | permission-access-all-transitions-2922266-1.patch | 2.18 KB | scott_euser |
Comments
Comment #3
scott_euser CreditAttribution: scott_euser as a volunteer and at Fat Beehive commentedThis is going to fail tests of course, but is this what you're looking for?
New permission "WORKFLOWNAME workflow: Use all transitions."
Comment #4
timmillwoodThere seems to be a lot of concern about too many permissions in core, I'm not sure we really want to add another one for each workflow.
Maybe this would be a good thing for a contrib module to add?
Comment #5
bhanuprakashnani CreditAttribution: bhanuprakashnani at Google Summer of Code commentedI have made the changes shown in the above patch. I hope it shows green.
Comment #7
timmillwoodI don't think we need drupal/console in core.
Extra white space.
Comment #8
bhanuprakashnani CreditAttribution: bhanuprakashnani at Google Summer of Code commentedComment #9
bhanuprakashnani CreditAttribution: bhanuprakashnani at Google Summer of Code commentedComment #11
bhanuprakashnani CreditAttribution: bhanuprakashnani at Google Summer of Code commentedPlease review.