Allow user with "assign node weight" permission to use "Node weight" menu link

Created on 11 September 2023, 10 months ago
Updated 9 November 2023, 8 months ago

Problem/Motivation

An user with "assign node weight" permission cannot navigate following the path Node Weight > {Any available content type}, this is because the Node weight menu link is using the "node_weight.form" route, meaning that in order to access this menu link the user needs the "administer node weight" permission, wich allows it to enable or disable a content type for weight manage.

The user with "assign node weight" permission can still access to the "node_weight.order" route, however, this one must know the path beforehand.

https://www.drupal.org/files/issues/2023-09-11/node-weights.png β†’

Steps to reproduce

Assign an user with the "assign node weight" permission but not the "administer node weight" permission, navigate to Node Weight.

Proposed resolution

Either use routes with "\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage" to generate parent routes for "node_weight.form" and the list of content types available for manage, or move "node_weight.form" to the configuration menu.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain SadySierralta

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

Comments & Activities

Production build 0.69.0 2024