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

As a 5.x User I expect better info when I lack access to content

    Details

      Description

      I created a new section and affected it to a node.

      In my website, when I'm not connected, if I try to see this page, Symfony throws an exception :

      "User does not have access to 'read' 'content'
      500 Internal Server Error - UnauthorizedException"

      Surprising. I think this exception should be caught by default to display a login form. This works if I set legacy_mode to true for my siteaccess. I would prefer not to do this.
      How can I catch this exception to display my login form or register form ? What is the best practice in eZ 5 ?

      I tried my problem in "prod mode". The exception is still displayed, but seems to be caught by twig :

      "TwigBundle:Exception:error500.html.twig"

      Also described here : http://share.ez.no/forums/ez-publish-5-platform/user-does-not-have-access-to-read-content/

        Issue Links

          Activity

          Hide
          Sylvain Guittard added a comment -

          Closing this issue, because it relates to 5.x (not supported) and Symfony provides a way to override the error pages.

          Show
          Sylvain Guittard added a comment - Closing this issue, because it relates to 5.x (not supported) and Symfony provides a way to override the error pages.
          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Hi

          You can do 2 things:

          The exception adds more granularity.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Hi You can do 2 things: Customize the error pages Implement an exception listener . The exception adds more granularity.

            People

            • Assignee:
              Unassigned
              Reporter:
              Nicolas Lescure
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: