Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29536

User isn't redirected to the login page when UnauthorizedException is thrown

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kamil.madejski@ibexa.co Kamil Madejski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: