cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Requirement to exclude some pages from Early Login (6.3)

Former Member
0 Likes
613

We have a customer that wants to implement early login for all the product-related pages on their B2B site on Commerce 6.3 (Cloud), but doesn't want this to apply to content pages (non-transactional e.g. Home, Contact Us, About Us etc.). Basically they want anonymous users to only see the non-transactional content pages and only logged in users to see the product related pages. Is there a way to do this with early login or do we have to build the restrictions into each page/component?

Accepted Solutions (1)

Accepted Solutions (1)

VinayKumarS
Active Contributor
0 Likes

go to your storefront/web/webroot/WEB-INF/config. then you will see below entries.

 <security:intercept-url pattern="/my-account/addressform" access="hasAnyRole('ROLE_ANONYMOUS','ROLE_CUSTOMERGROUP')" requires-channel="https" />
 

there u add your relative path

 <security:intercept-url pattern="/my-account/<<url>>" access="hasAnyRole('ROLE_ANONYMOUS','ROLE_CUSTOMERGROUP')" requires-channel="https" />
 

do a clean build. run the server and check

Answers (2)

Answers (2)

Former Member
0 Likes

Thank you - all solved

Former Member
0 Likes

Also added the following to prevent weird logout message:

 <!-- Logout Success Handler -->

 <util:list id="logoutRestrictedPages" value-type="java.lang.String">
     <value>/my-account</value>
     <value>/checkout</value>
     <value>/quote</value>
     **<value>/c</value>
     <value>/p</value>**
 </util:list>
Former Member
0 Likes

Great thanks.

My entry into the file: \hybris\bin\custom\yb2bacceleratorstorefront\web\webroot\WEB-INF\config\spring-security-config.xml

                           <security:intercept-url pattern="/**/c/**" access="hasRole('ROLE_CUSTOMERGROUP')" requires-channel="https" />
                           <security:intercept-url pattern="/**/p/**" access="hasRole('ROLE_CUSTOMERGROUP')" requires-channel="https" />