- Issue created by @bnjmnm
This isn't an issue if only core is in use, but if contrib/custom change these permissions (which does happen!), this can result in operations linking to unavailable forms.
Currently MenuListBuilder
provides the "Add Link" operation if the menu edit operation is present.
if (isset($operations['edit'])) {
$operations['edit']['title'] = t('Edit menu');
$operations['add'] = [
'title' => t('Add link'),
'weight' => 20,
'url' => $entity->toUrl('add-link-form'),
'query' => [
'destination' => $entity->toUrl('edit-form')->toString(),
],
];
}
However, these are two distinct entity types that could have their own access restrictions.
Instead of isset($operations['edit'])
, it would be more accurate to check ->createAccess()
on the access control handler for menu link content.
Active
11.0 π₯