How to add flexible search restriction for Product with custom session attribute and resolve all exceptions
https://clutcher.github.io/post/hybris/flexible_search_restriction_with_custom_session_attributes/
OOTB hybris has a powerful “Flexible Search Restriction” system, which allows transparently restrict access to any hybris item type. Due to flexible search restrictions are implemented on a very low level of hybris ORM time to time unexpected issues can appear even for simple restrictions.
For example simple task: show products for users only in case if product and users root B2BUnit have relation to same CxSegment.
To implement it you need:
- Create relation between CxSegment and B2BUnit/Product:
- Create flexible search restriction with query:
Comments
Post a Comment