Creating a Cockpit Perspective Restriction

Applications that are based on SAP Commerce Cloud cockpit framework, such as the Product Cockpit and the Import Cockpit, can be easily customized. One of the customization mechanisms is the perspective restriction that manages the visibility and access rights of a particular perspective.

To enable this mechanism, follow the steps below:

  1. Learn what is the unique identifier of customized perspective
  2. Create the UI Cockpit Component Restriction

Retrieving Unique Perspective Identifier

In order to get an unique perspective identifier you have to look for the xxxx-web-spring.xml file in our xxxx cockpit application, for example: UI Cockpit Component Restrictionproductcockpit-web-spring.xml or cmscockpit-web-spring.xml and search for uid property for desired perspective. See the image below.

Creating UI Cockpit Component Restrictions

In the second step, you have to create an object.

  1. Go to the Backoffice Administration Cockpit, navigate to and expand Cockpit node in the Explorer Tree.
  2. Choose UI Component Access Rights and click the Create New icon to open the Create New Cockpit UI Component Access Right wizard.
  3. Fill in the necessary fields in the wizard. When the new Cockpit UI Component is created, you can set its properties in the Editor Area:
    • Component Code - unique perspective identifier that we get in first step
    • User accounts with read permission - a set of principals that posses read permission
    • User accounts with write permission - a set of principals that posses write permission

Results

The results of previous configuration is that product perspective are displayed only for anonymous user.

  • Before Customization
  • After Customization