IBX-6773: Fixed loading Bookmarks for non-accessible content items - #476
IBX-6773: Fixed loading Bookmarks for non-accessible content items#476vidarl wants to merge 44 commits into
Conversation
bdac332 to
9164daa
Compare
|
9164daa to
ec96060
Compare
konradoboza
left a comment
There was a problem hiding this comment.
Did you make sure none of the deprecated classes are still in use?
|
@konradoboza : FYI : Had to add related PR : ibexa/admin-ui#1835 |
0c025cd to
fd7cc86
Compare
…tFilteringTest and LocationFilteringTest
alongosz
left a comment
There was a problem hiding this comment.
It looks like it's almost done, great work @vidarl 💪
I have one general remark to test coverage - it's extensive, but I don't see an integration test case that reproduces the scenario which created this bug report - remove permissions for an item user previously has bookmarked.
Other remarks:
…ck in IsBookmarkedQueryBuilder
…y in IsBookmarked criterion
… in IdSortClauseQueryBuilder
…itoryException, log at error level
46b69f8 to
493a1df
Compare
b3ffa7f to
fb6c2bd
Compare
fb6c2bd to
4ea28c1
Compare
@alongosz : Added in 4ea28c1: Added regression tests for bookmarks of inaccessible and removed items PR should not be ready again for your sharp eyes |
| /** | ||
| * Loads bookmarks owned by user. | ||
| * | ||
| * @deprecated 4.6.32 The "Handler::loadUserBookmarks()" method is deprecated, will be removed in 6.0.0. Use "LocationService::find()" and "Criterion\Location\IsBookmarked" instead. |
There was a problem hiding this comment.
Note
Let's keep an eye out for this when merging - 4.6.32 is outdated since last week - (added a note in the PR's description) and bump it right before merge.
|



Warning
Related PRs:
loadBookmarkscall with Repository filtering requirements admin-ui#1835Description:
If user bookmark some location which he later looses access too, then the bookmark list in admin-ui fails with an exception.
Simply fixing
BookmarkService::loadBookmarks()would be easy. The problem is to implementcountUserBookmarks()in persistence layer and having it taking into account user permissions so that BC would be kept.Talked with Adam on how to solve this without breaking BC and he suggested implementing it using filtering
The Bookmark filter will only work with location filtering (LocationService::find()), not with content (ContentService::find())Code was initially based on ezsystems/ezplatform-kernel#408 which was not approved and merge in time before 3.3 went EO, but has been heavily modified since.
For QA:
Read ticket for info on how to reproduce
Documentation:
Documentation for the new filter needs to be made, indeed