Verifies that the current user can access the requested path.
@todo This is a total hack to keep our current access system working. It should be replaced with something robust and injected at some point.
Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The Event to process.
public function onKernelRequestAccessCheck(GetResponseEvent $event) {
$router_item = $event
->getRequest()->attributes
->get('drupal_menu_item');
if (isset($router_item['access']) && !$router_item['access']) {
throw new AccessDeniedHttpException();
}
}