added domain logic for permission checks (#1803)

This commit is contained in:
Kevin Papst
2020-07-04 13:29:03 +02:00
committed by GitHub
parent 091740f407
commit 682681afa5
16 changed files with 39 additions and 14 deletions

View File

@@ -31,7 +31,7 @@ class AjaxAuthenticationSubscriber implements EventSubscriberInterface
$request = $event->getRequest();
if ($request->isXmlHttpRequest()) {
$exception = $event->getException();
$exception = $event->getThrowable();
if ($exception instanceof AuthenticationExpiredException) {
$event->setResponse(new Response('Session expired', 403, ['Login-Required' => true]));
} elseif ($exception instanceof AuthenticationException) {