public function onKernelController(FilterControllerEvent $event)
    {
        if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) {
            return;
        }

        if (!$this->isAdminSiteAccess) {
            return;
        }

        $currentRoute = $event->getRequest()->attributes->get('_route');

        foreach ($this->legacyRoutes as $legacyRoute) {
            if (stripos($currentRoute, $legacyRoute) === 0) {
                $event->getRequest()->attributes->set('_controller', 'ezpublish_legacy.controller:indexAction');
                $event->setController($this->controllerResolver->getController($event->getRequest()));

                return;
            }
        }
    }