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

Content cannot be created under subtree when assignment limitation is used

    XMLWordPrintable

Details

    Description

      When the user group is using role with limitation to the subtree, there is no possibility to add content in this subtree.

      Steps to reproduce:
      1. Create folder "test" under /Home.
      2. Create a user group and name it "user_group".
      3. Create four roles as presented below:
      3.1. Role read with Content\Read policy, no limitations.
      3.2. Role create with Content\Create policy, no limitations.
      3.3. Role publish with Content\Publish policy, no limitations.
      3.4. Role basic with User\Login policy, limitation "admin" SiteAccess, User\Password and User\Selfedit both with no limitations.
      4. Assign "create", "read" and "publish" roles to user_group limiting it to subtree Home/test and "basic" with no limitations.
      5. Add a new user "test_user" under user_group.
      6. Login as a "test_user".
      7. Go to "test" - there will be red bar with: Cannot read property 'subitems' of undefined. No corrupted request or console error.
      8. Try to create content.

      Result:
      You will be presented with an error:

      An exception has been thrown during the rendering of a template ("Argument '$targets' is invalid: If $object is ContentCreateStruct must contain objects of type: LocationCreateStruct").
      

      See stacktrace attached.

      Note:
      In eZ Platform 2.5.2 content cannot be created - Create button is disabled (reproduced using the same set of permissions as mentioned above). As the user has Content\Create permission for this subtree, it should be possible.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: