Problem/Motivation

When selecting which roles can participate in workflow, that is not being followed by transition_roles config screen

Steps to reproduce

Remove all roles from the permission on the WF that has this label:

Participate in workflow
Warning: For better control, uncheck 'Authenticated user', manage permissions per separate role, and re-enable 'Authenticated user'. Role is enabled to create state transitions. (Determines transition-specific permission on the workflow admin page.)

and then go to transition_roles configuration of the WF specific on the above text, and see that all roles are available to be selected and participate on the workflow.

admin/config/workflow/workflow/WF/transition_roles

until now we would get a limited list of roles on transition_roles config that were allowed on permissions.

In fact, even the help text says this:

If not all roles are in the list, please review which roles may 'participate in workflows' on the Permissions page. On that page, uncheck the 'Authenticated user' role temporarily to view the permissions of each separate role.

Proposed resolution

This is introduced in 8.x-1.8, #3419771: user_roles() and user_role_names() are deprecated

CommentFileSizeAuthor
#3 3424655-3.patch551 bytesjrochate

Comments

jrochate created an issue. See original summary.

jrochate’s picture

If I downgrade from 1.x-dev to 1.7, it works as expected, where the roles are limited to the ones definied on the main Permissions Drupal area.

jrochate’s picture

Status: Active » Needs review
StatusFileSize
new551 bytes

if we follow the recommend way to replace previous method, then we can fix it.

Read more here: https://www.drupal.org/node/3349759

Patch in attach the solve the problem.

jrochate’s picture

johnv’s picture

Title: Participate in workflow doesn't make any difference » Participate in workflow doesn't make any difference in version 8.x-1.8
Issue summary: View changes

  • johnv committed a34e057f on 8.x-1.x authored by jrochate
    Issue #3424655 by jrochate: Participate in workflow doesn't filter after...
johnv’s picture

Title: Participate in workflow doesn't make any difference in version 8.x-1.8 » Participate in workflow doesn't filter after deprecating user_role_names in 8.x-1.6+dev
Version: 8.x-1.x-dev » 8.x-1.7
Status: Needs review » Fixed

Thanks for this catch.

johnv’s picture

Title: Participate in workflow doesn't filter after deprecating user_role_names in 8.x-1.6+dev » Permissions: Participate in workflow doesn't filter after deprecating user_role_names in 8.x-1.6+dev

Status: Fixed » Closed (fixed)

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