MenuAccessTest::testSystemAdminMenuBlockAccessCheck uses /admin/people which does not access tag being tested

Created on 6 November 2023, 12 months ago

Problem/Motivation

In 🐛 Restrict access to empty top level administration pages Fixed we were testing routes that had the _access_admin_menu_block_page access tag which gets added in \Drupal\system\EventSubscriber\AccessRouteAlterSubscriber::accessAdminMenuBlockPage for routes that use Drupal\system\Controller\SystemController::systemAdminMenuBlockPage

Unfortunately we(meaning me, sorry) used admin/people which I thought used systemAdminMenuBlockPage but looking at the route

entity.user.collection:
  path: '/admin/people'
  defaults:
    _entity_list: 'user'
    _title: 'People'
  requirements:
    _permission: 'administer users'

It does not use that callback.

Steps to reproduce

Proposed resolution

Replace the use of admin/people with admin/reports(or another route that uses systemAdminMenuBlockPage).
Check if we are using any other routes that don't use that controller.

We can leave routes that are using \Drupal\system\Controller\SystemController::overview because that is being addressed in 📌 Restrict access to empty top level administration pages for overview controller Fixed

Remaining tasks

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Menu system 

Last updated about 21 hours ago

Created by

🇺🇸United States tedbow Ithaca, NY, USA

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

Comments & Activities

Production build 0.71.5 2024