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

CMS Page Restrictions working in reverse

Former Member
0 Kudos
4,882

I have created two restrictions one for Link Component and other for CMS page by using following Impex.

1.INSERT_UPDATE CMSUserGroupRestriction;$contentCV[unique=true];uid[unique=true];name;userGroups(uid);includeSubgroups;components(&linkRef)

;;invoiceRestriction;Invoice Customer Group Restriction;invoceRestrictionGroup;true;capsugelInvoicesNavNodeLink

2.INSERT_UPDATE CMSUserGroupRestriction;$contentCV[unique=true];uid[unique=true];name;userGroups(uid);includeSubgroups;pages(uid, $contentCV)

;;orderHistoryRestriction;Order History Page Restriction;orderHistoryRestrictionGroup;true;orderHistory

The link Component is restricted/hidden for invoceRestrictionGroup which is expected,whereas by applying page restriction the page is shown to that particular customers in that group(orderHistoryRestrictionGroup) which is working in reverse of expectation.

is there any solution to use Page Restriction Correctly ?(I mean page should not be available for that particular group of users)

Hybris Version 6.2.

Accepted Solutions (0)

Answers (1)

Answers (1)

arvind-kumar_avinash
Active Contributor
0 Kudos

Hi Harindra Burma - you need to create an Inverse Restriction for the orderHistoryRestriction as shown below:

INSERT_UPDATE CMSInverseRestriction;$contentCV[unique=true];name;originalRestriction(&uid);uid[unique=true];
;;Order History Page Inverse Restriction;orderHistoryRestriction;orderHistoryPageInverseRestriction;

You can put the value for name and uid[unique=true] as per the naming convention in your project.

Former Member
0 Kudos

Hi @Arvind Kumar Avinash ,thanks for the reply and could you please clarify for below
1.As per your suggestion we will be applying originalRestriction and Inverse Restriction both on same user group,does this works ?

2.because of the original restriction which is applied to orderHistory page.....the page will not be accessible to other users or user groups.

Could you please suggest if any other solution which can be implemented to directly restrict/hidden to paricular user or usergroup ?

arvind-kumar_avinash
Active Contributor
0 Kudos

The default behaviour of the CMSUserGroupRestriction is that the page is accessible to (or in other words, restricted to) only the specified UserGroup. So in order to invert this behaviour, you need to apply CMSInverseRestriction on the CMSUserGroupRestriction. Did you try the solution?