Issue
Resolution
In this use case, the following fields are populated as shown:
- Catalog contains category_1, category_2
- category_1 contains item_1
- category_2 contains subcategory_2
- subcategory_2 contains item_2
Both category_1 and category_2 have a user criteria available for that doesn't permit the user to see them. The user has access to subcategory_2.
This was tested with the following results:
- Typing item_1 in the typeahead search returns no results.
- Typing item_2 in the typeahead search displays item_2 results.
Per the configuration, item_2 is in subcategory_2, and subcategory_2 is in category_2, but for category_2 the user doesn't have access. So logically user should not have access to item_2 even though the "available for" is allowing the user.
System Functionality
User criteria on the category is solely for the purpose of browsability. When searching for an item, it checks if there is any accessible category for the user and displays it if available.
In the above use case, both category and subcategory are from the sc_category table. The system looks at all the records in the table and validates the access.
So, in this case, there is no logical relation between category_2 and subcategory_2 in the current system functionality. This results in item_2 showing in the search results. This is the expected behavior of the system.