diff --git a/src/bundle/Core/Resources/config/security.yml b/src/bundle/Core/Resources/config/security.yml index fb74525faf..cc0f36177d 100644 --- a/src/bundle/Core/Resources/config/security.yml +++ b/src/bundle/Core/Resources/config/security.yml @@ -44,10 +44,6 @@ services: ibexa.security.user_provider.username: '@Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider' ibexa.security.user_provider.email: '@Ibexa\Core\MVC\Symfony\Security\User\EmailProvider' - Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\AccessDeniedSubscriber: - autowire: true - autoconfigure: true - Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\OnAuthenticationTokenCreatedRepositoryUserSubscriber: autowire: true autoconfigure: true diff --git a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php deleted file mode 100644 index 892ce86ebc..0000000000 --- a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php +++ /dev/null @@ -1,46 +0,0 @@ - ['onKernelException', 2], - ]; - } - - public function onKernelException(ExceptionEvent $event): void - { - $exception = $event->getThrowable()->getPrevious(); - - if ($exception instanceof IbexaRepositoryException) { - return; - } - - $event->setResponse(new RedirectResponse( - $this->urlGenerator->generate('login') - )); - } -}