added domain logic for permission checks (#1803)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user