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

Accessing content which has relation to content residing in restricted section ends up with an error

    XMLWordPrintable

Details

    • [3.0] - Sprint 16

    Description

      There is an unhandled exception thrown when accessing content having relation to another one being a part of restricted section.

      Steps to reproduce:

      1. Create a new "test" user.
      2. Create a new section and name it "testSection".
      3. Create a new article "allowed" and assign it to "testSection".
      4. Create a new article "restricted" without any section assigned.
      5. Edit "allowed" and add "restricted" article as a relation in the ezrelationlist FieldType.
      6. Create a new role "testRole" with the following policies and limitations:
        Module Function Limitations
        Content Read Section: testSection
        Content Reverserelatedlist None
        Content Create None
        Content Edit  Section: testSection
        Content Publish Section: testSection
        Content Manage_locations None
        User * None

      7. Assign "testRole" to "test" user.
      8. Login as "test".
      9. Try to access "allowed" content.

      Result:

      You will be presented with an error, see stacktrace.png for further details.

      An exception has been thrown during the rendering of a template ("User does not have access to 'read' 'content' with: contentId '56'") in "EzPlatformAdminUiBundle:fieldtypes/preview:content_fields.html.twig".

      Note:
      The issue is reproducible in dev environment.

      Attachments

        Activity

          People

            Unassigned Unassigned
            konrad.oboza@ibexa.co Konrad Oboza
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: