hook_menu_link_content_create_access() no way to get the current menu

Created on 8 June 2020, over 4 years ago
Updated 25 July 2024, 5 months ago

Problem/Motivation

Created this issue because of #2996548: Compatibility with other modules (custom, contrib or even core) β†’ .

Currently in Menu Admin per Menu β†’ , access checks are added by overriding all the acccess checks on the routes in a custom RouteSubscriber event.

In #2996548: Compatibility with other modules (custom, contrib or even core) β†’ we try to solve this more elegantly and e.g. adding access checks when creating menu_links to
hook_menu_link_content_create_access(). Since menus and menu links differ structurally from content entities, there is currently no way to find out for which menu we try to add a menu_content_link.

Proposed resolution

Find a way to pass the current menu into hook_ENTITY_TYPE_create_access() for which the menu link is added.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
Menu link contentΒ  β†’

Last updated 3 days ago

Created by

πŸ‡§πŸ‡ͺBelgium JeroenT πŸ‡§πŸ‡ͺ

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024