Route always inaccessible if it has a permission requirement using OR ('+')

Created on 21 June 2023, over 1 year ago
Updated 19 July 2023, over 1 year ago

Problem/Motivation

If a route has a permission requirement using OR ('+'), our altering of the requirement breaks it, making the route inaccessible to all. An example route is entity.taxonomy_vocabulary.collection with access taxonomy overview+administer taxonomy as permission requirement.

The reason is that OR ('+') and AND (',') separators cannot be used at the same time (see Drupal\user\Access\PermissionAccessCheck::access).

Proposed resolution

Since this kind of requirement cannot be expressed using a simple _permission string, we should replace it with a custom access check.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024