File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ public function resolve(MenuInterface $menu) {
91
91
];
92
92
93
93
return array_filter ($ this ->menuLinkTree ->transform ($ tree , $ manipulators ), function (MenuLinkTreeElement $ item ) {
94
- return $ item ->link instanceof MenuLinkInterface && $ item ->link ->isEnabled ();
94
+ return $ item ->link instanceof MenuLinkInterface
95
+ && $ item ->link ->isEnabled ()
96
+ && (!isset ($ item ->access ) || $ item ->access ->isAllowed ());
95
97
});
96
98
}
97
99
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class MenuTreeSubtree extends DataProducerPluginBase {
36
36
*/
37
37
public function resolve (MenuLinkTreeElement $ element ) {
38
38
return array_filter ($ element ->subtree , function (MenuLinkTreeElement $ item ) {
39
- return $ item ->link ->isEnabled ();
39
+ return $ item ->link ->isEnabled () && (! isset ( $ item -> access ) || $ item -> access -> isAllowed ()) ;
40
40
});
41
41
}
42
42
You can’t perform that action at this time.
0 commit comments