Details
-
Bug
-
Resolution: Done
-
High
-
2.1.0-rc1, 2.5.2
-
None
-
[3.0] - Sprint 11
Description
When trying to access a Content that is available only through an Object State limitation Content is not displayed - Exceptions shown.
At the bottom of the ticket I've included a slight modification that results in a different Exception, but the end result is the same - Content is not displayed in the back office (instead internal server error happens).
Steps to reproduce:
1. Create a new Object State Group - Colors
2. Add two new Object States there - Green and Blue
3. Add a new User - TestUser
4. Create a new Role
5. Assign created user to that Role
6. Assign following Policies to that Role:
- Content: Read (State: Lock:Locked, Colors: Green)
- User: Login
- Section: View
- Content: Edit
- User: Password
- Content: Versionread
- Content: Create
- Content: reverserelatedlist
7. Create a new Article in the back office
8. Assign it the following Object State:
- Lock:Locked
- Color: Green
9. Logout
10. Login as created previously user
11. You should see the created Article in the Dashboard - open it
Expected:
Content Item is displayed - it's in correct Object State that I have permission to.
Actual:
Notification message is displayed: Cannot read property `subitems` of undefined. - not enough intuitive. If you go to edit mode there is an exeption:
An exception has been thrown during the rendering of a template ("User does not have access to 'read' 'content'"). [in vendor/ezsystems/ezplatform-admin-ui/src/bundle/Resources/views/content/locationview.html.twig:51]
What is more, when user wants to display Content Tree, only loading icon appears.
Note:
If in Step 6 you add an additional Limitation: Content: Read (Subtree: Home)
And after Step 8 change Home Object State to "Lock: Locked" and "Color: Green"
Then trying to visit your Article as created user works fine, edit mode as well.