? ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
13 May 2020

Summary of Changes

The Smart Search component (com_finder) in the frontend was hardcoded to always use the view access levels from the current user and thus did not allow to override that when using the model in a different context. Since we are already populating the current state of the model with the view access levels of the current user, we might as well use them here directly.

Testing Instructions

  1. Have Smart Search setup correctly and add 2 articles, one for public users, one for registered users with similar content, so that you can have a matching search term in both articles.
  2. Search for the matching term and see that you only get the public article.
  3. Edit components/com_finder/src/Model/SearchModel.php line 489 and replace $user->getAuthorisedViewLevels() with [1,2]. Search again and still only see the public article. Revert the code change.
  4. Apply the patch and search for the term again, again only getting the public article.
  5. Do the changes from step 3 again (the line has moved up a bit) and search again. Now you should get both articles.
avatar Hackwar Hackwar - open - 13 May 2020
avatar Hackwar Hackwar - change - 13 May 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 May 2020
Category Front End com_finder
avatar Hackwar Hackwar - change - 26 May 2020
Labels Added: ? ?
avatar wilsonge wilsonge - change - 29 May 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-05-29 23:27:57
Closed_By wilsonge
Labels Added: ?
Removed: ?
avatar wilsonge wilsonge - close - 29 May 2020
avatar wilsonge wilsonge - merge - 29 May 2020
avatar wilsonge
wilsonge - comment - 29 May 2020

Thanks!

Add a Comment

Login with GitHub to post a comment