on 2019 May 22 2:21 AM
Hi,
I need to add a custom attribute to the session for search restriction purpose (in backoffice). The issue is that when I add such attribute to the session using sessionService on filter level added to backofficeFilterChain this attribute is set correctly but is not visible during search restriction evaluation.
Backoffice sais that session.attribute is not visible/present.
When I debug in the code it appears that sessionService used in FlexibleSearch execution is different then sessionService on filter level (bean is the same but attributes are different). Attributes for restriction evaluation are always the same (user, catalogVersion, etc.)
I don't know why? Any ideas? Something is clearing session before search execution? The session is not the same because it's different between web context (filter) and core context (FlexibleSearch)? How can I add some custom attributes visible on SearchRestriction evaluation in backoffice? On storefront level, such session attribute is visible without any problem.
Thanks
Łukasz
Request clarification before answering.
Hi ,
I guess that you are referring to de.hybris.platform.servicelayer.session.SessionService. Did you try using com.hybris.cockpitng.util.CockpitSessionService?
I don't know your case in details, but maybe you could use org.springframework.security.web.context.HttpRequestResponseHolder and put something to HttpSession directly?
Cheers, Jacek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.