Restrictions

In addition to assigning WCMS component restrictions, the Assisted Service Module allows you to assign restrictions for different usergroups on the URL level.

.

A new request filter AssistedServiceFilter class is added to the default request filter chain. This filter is injected via Spring and referenced in the assistedservicestorefront-web-spring.xml file as the AssistedservicestorefrontFilterListMergeDirective bean.

The filter evaluates each request against the list of restrictions using the AssistedServicePathRestrictionEvaluator class. You can add new items to the list of restrictions used by the evaluator by adding them to the assistedServicePathRestrictionsList bean in the assistedservicestorefront-spring.xml file:

<alias name="defaultAssistedServicePathRestrictionsList" alias="assistedServicePathRestrictionsList" />
	<util:list id="defaultAssistedServicePathRestrictionsList">
		<ref bean="assistedServiceSalesGroupPathRestriction"/>
</util:list>

The AssistedServiceSalesGroupPathRestriction class extends the abstract AssistedServicePathRestriction class. The abstract class provides a set of methods used by all path restrictions, so make sure your custom restrictions extends this class. The AssistedServiceSalesGroupPathRestriction class contains the evaluate() method, which checks the URL against the list of restricted URLs for a given usergroup. You can configure the restricted paths in the defaultAsmSalesGroupRestrictedPaths bean in the assistedservicesstorefront-spring.xml file:

<alias name="defaultAsmSalesGroupRestrictedPathsList" alias="asmSalesGroupRestrictedPathsList" />
	<util:list id="defaultAsmSalesGroupRestrictedPathsList" value-type="java.lang.String">
		<value>/checkout/multi/summary/placeOrder</value>
</util:list>

When an assisted service agent who is a member of the asagentsalesgroup usergroup clicks the Place Order button, the URL is evaluated and prohibits the assisted service agent from placing the order and displays a warning at the top of the page: You do not have access rights to perform this action.

Default Assisted Service Agent Restrictions

By default, all assisted service agents have restricted functionality on the Support Tickets page in order to prevent the assisted service agents from creating or updating customer's support tickets. Below, you can see a list of restrictions and the functionality they limit:
  • URL restriction on the Add Support Ticket page
  • CMS restriction in the Add Message button
The following restriction is responsible for limiting the Add Support Ticket functionality, as shown in the following example from the assistedservicesstorefront-spring.xml file:
<alias name="defaultAsmAllAgentsRestrictedPathsList" alias="asmAllAgentsRestrictedPathsList" />
    <util:list id="defaultAsmAllAgentsRestrictedPathsList" value-type="java.lang.String">
        <value>/my-account/add-support-ticket</value>
        <value>POST:/my-account/support-ticket/**</value>
    </util:list>

If an assisted service agent tries to create a customer's ticket, the You do not have access rights to perform this action error message is displayed.

If an assisted service agent tries to update a customer's ticket, a restriction placed in the Add Message button is triggered. Namely, the button is not displayed to an assisted service agent.