Ability to hide menu links for admins but still enabling them to edit the link

Created on 15 March 2024, 3 months ago
Updated 18 June 2024, 7 days ago

Problem/Motivation

My goal is to add menu links for editors in the admin menu (i.e. in the backend). The links should only be visible to editors of certain roles but *not* for admins as these links would be redundant for them.

Now I can achieve this by activating the option "Administrator role bypass access check in admin context" in the settings of this module. But the downside is that now admins can't see the menu link in the page https://about.ddev.site/admin/structure/menu/admin as well :-(

Is there already an option in the module to do so or would that behavior be a new feature?

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @Defcon0
  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Hi,

    I think you should configure the menu links to be hidden for admins and on the module settings form:
    - check "Administrator role bypass access check in admin context"
    - uncheck "Administrator role bypass access check in front"
    - uncheck "Administrator bypass"

    So admins will have access check in front but not in backoffice.

Production build 0.69.0 2024