Empty parent items visible in Gin sidebar when using Navigation (Drupal toolbar) and user lacks access to children

Created on 29 April 2025, 14 days ago

Problem/Motivation

When the Gin admin theme is configured to use the experimental
Navigation (Drupal toolbar) integration (Sidebar, Vertical toolbar),
top-level menu items are still rendered even if the current user has no access
to any of their child links.
This leaves blank sections in the left-hand drawer that contain only an icon and
chevron but no label or submenu items (see screenshots).
The legacy vertical toolbar (core Toolbar module) correctly omits these
sections, so the behaviour is a regression when switching to the new
Navigation integration.

Steps to reproduce

  1. Enable core module Navigation.
  2. Install/enable Gin Admin Theme and Gin Toolbar.
  3. In Appearance ▸ Gin ▸ Toolbars select:

    Navigation (Drupal toolbar) – Sidebar, Vertical toolbar (Default).
  4. Create a role that does not have access to pages such as
    /admin/appearance, /admin/modules, etc.
  5. Log in as a user that has only that role.
🐛 Bug report
Status

Active

Version

2.0

Component

User interface

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

Comments & Activities

Production build 0.71.5 2024