Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to #916388: Convert menu links into entities.
Problem/Motivation
We need to split the acces control code from _menu_link_translate() to its proper place in the entity class.
Proposed resolution
Implement access controllers for menu and menu link entities.
Related Issues
#2012916: Implement access controller for the menu and menu link entity
#1882552: Deprecate menu_list_system_menus() and menu_ui_get_menus()
Comment | File | Size | Author |
---|---|---|---|
#8 | interdiff.txt | 1.64 KB | andypost |
#8 | access-menu-link-1842850-8.patch | 10.39 KB | andypost |
#7 | interdiff.txt | 4.14 KB | andypost |
#7 | access-menu-link-1842850-7.patch | 9.71 KB | andypost |
#6 | interdiff.txt | 3.01 KB | andypost |
Comments
Comment #1
BerdirAny reason this is postponed?
Adding this to the list in #1346214: [meta] Unified Entity Field API
Comment #2
amateescu CreditAttribution: amateescu commentedIt was postponed on the initial conversion issue.
Comment #3
andypostis this tags still right?
Comment #4
BerdirThis is better.
Comment #5
andypostInitial patch
Comment #6
andypostSuppose better to make them both
Comment #7
andypostAnd a bit more
Comment #8
andypostSeems access should live near definition, also cleaned-up copy/paste errors
Comment #9
andypostNext round should be split of
_menu_link_translate()
into 3 methods:And then
_menu_check_access()
Comment #10
amateescu CreditAttribution: amateescu commentedNice work @andypost, the patch looks great so far!
However, the initial problem/motivation from the OP is still about cleaning up
_menu_link_translate()
, as you mentioned above, so I don't really feel comfortable rtbc-ing this without adressing that part :(Comment #11
andypost@amateescu so maybe better to split the issue in to Generic implementation of AccessController and leave this one about
_menu_link_translate()
?Comment #12
amateescu CreditAttribution: amateescu commentedYep, I think that's the best thing to do.
Comment #13
andypostFiled #2012916: Implement access controller for the menu and menu link entity
Comment #13.0
andypostsummary
Comment #14
amateescu CreditAttribution: amateescu commentedBetter title.
Comment #15
amateescu CreditAttribution: amateescu commentedThere's no patch for the current scope of this issue.
Comment #16
andypostNow #2012916: Implement access controller for the menu and menu link entity commited so let's split
_menu_link_translate()
Comment #17
andypostSuppose this more related to menu system and proper tags
Comment #17.0
andypostUpdated issue summary.
Comment #18
pwolanin CreditAttribution: pwolanin commentedThis is almost certainly duplicate to changes in the patch at #2047633: Move definition of menu links to hook_menu_link_defaults(), decouple key name from path, and make 'parent' explicit, or at least needs to be postponed until that is done.
Comment #19
andypost@pwolanin Can we close this one?
Comment #20
BerdirYeah, pretty sure this can be closed?
Comment #21
dawehnerYeah, this can be closed indeed.