Keep standard Administration menu

Created on 14 February 2025, 5 months ago

Problem/Motivation

I wanted to use this module to display a custom menu gathering a bunch of my most used admin pages. However, I realized that as soon as you add a menu using this module, the standard administration menu is removed from the toolbar.

It would be quite nice to have an option to keep the standard admin menu in place and to simply add the new custom menu at the end of the toolbar.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium Axael

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

Comments & Activities

  • Issue created by @Axael
  • 🇦🇹Austria mvonfrie

    My problem is that I want to use the account menu as custom menu with some added items, which includes the default items like "My account", "My profile" or "Logout". But when I assign the custom menu to the authenticated role, administrators don't have access to the admin menu anymore. Thus, another option would be to add an role exclusion list:

    Use the custom menu, if the user has any of the configured roles but none of the exclusion roles, i.e.

    Configured roles:
    [ ] Anonymous
    [x] Authenticated user
    [x] Editor
    [ ] Site Manager
    [ ] Administrator
    
    Exclusion roles:
    [ ] Anonymous
    [ ] Authenticated user
    [ ] Editor
    [x] Site Manager
    [x] Administrator

    So, every authenticated user (and editors in special) get the custom menu, except they are admins or site managers.

  • 🇵🇹Portugal jmauricio

    I will look into this as soon as i have some time

    • jmauricio committed 9d2e8ae3 on 1.0.x
      Issue #3506757 by axael, mvonfrie, jmauricio: Keep standard...
  • 🇵🇹Portugal jmauricio

    Pushed to 1.0.x, can you please test it?

  • 🇵🇹Portugal jmauricio

    1.0.6 release

  • 🇦🇹Austria mvonfrie

    Awesome, thanks. Both variants (adding custom menu items to admin menu, excluding roles) work.

  • Status changed to Fixed 9 days ago
  • 🇳🇱Netherlands askibinski

    I just wanted to check here if I understand correctly before creating a separate issue:

    Looking at Gin's code, a lot of the menu is hardcoded without access checks in getNavigationStructure.

    Using this module, we can indeed add or replace items in the "middle" part (which is awesome by the way), but the top and bottom part are always displayed.

    In my usecase, I have a role which can only view some custom entities, but the "Create" menu -> top will always be shown for all content types resulting in access denieds.

    Now, I can fix this in custom code, but I'm wondering whether this should be an (access) issue in the gin project, or additional toggles in this module?

  • 🇵🇹Portugal jmauricio

    I dont really touch that part of the toolbar, so i would say its a gin access check issue.

Production build 0.71.5 2024