Hide empty Management toolbar

Created on 11 February 2025, 3 months ago

Problem/Motivation

If you don’t allow a user / role to view any admin menu item, the user will see the Management button with empty submenu.

Proposed resolution

Including the following css code resolves this issue, we could put it in the module's css file:

.toolbar-tab:has(.toolbar-menu-administration:empty) {
  display: none;
}
✨ Feature request
Status

Active

Version

3.5

Component

Code

Created by

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

Comments & Activities

  • Issue created by @nitrocad
  • Issue was unassigned.
  • πŸ‡«πŸ‡·France dydave

    Thanks @nitrocad for contributing this code and raising this issue, it's greatly appreciated! πŸ™‚

    If you don’t allow a user / role to view any admin menu item, the user will see the Management button with empty submenu.

    How do you test that? πŸ˜…
    Could you please provide some of the permissions or roles, created/used for testing this issue?

    Could you please also provide a screenshot if possible?

    If possible, could you please also try with the latest version of the module, either stable or dev?

    Anything that could help reproducing the issue locally, would allow us to test and reviewer quicker the suggested changes and confirm whether the code could really be needed, thus moving this issue forward. πŸ‘

    Feel free to let us know if you have any questions, advice or suggestions on this particular issue or the project in general, we would certainly be glad to help.
    Thanks in advance!

Production build 0.71.5 2024