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

Created on 11 September 2023, over 1 year ago
Updated 9 November 2023, over 1 year 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.71.5 2024