Apply access checks to routes.
\Drupal\Core\Routing\RouteBuildEvent $event: The event to process.
public function onRoutingRouteAlterSetAccessCheck(RouteBuildEvent $event) {
$this->accessManager
->setChecks($event
->getRouteCollection());
}