Details
-
Bug
-
Resolution: Fixed
-
High
-
2.2.2
-
None
Description
When the user doesn't have permissions (for instance content/read) then eZ\Publish\Core\Base\Exceptions\UnauthorizedException is thrown.
Behavior in v1 and legacy
A user is redirected to the login page (by default /login).
Current behavior
A user is not redirected. An application shows
The server returned a "500 Internal Server Error".
In the logs are entries regarding that:
request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("User does not have access to 'read' 'content'")." at /Users/kamil/www/ezplatform-ee/vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/views/pagelayout.html.twig line 11
Unknown macro: {"exception"}
Expected behavior
As in v1 and legacy.