0

I am using SAP Commerce Cloud 19.05 in my B2C project.We have certain custom itemtypes like:

  1. XYZCompanyProduct(extends Product)
  2. XYZLaptopProduct(extends XYZCompanyProduct)
  3. XYZMobileProduct(extends Product)

Now in the explorer tree, we have three nodes corresponding to the above nodes. We want certain users to have access to XYZLaptopProduct and Orders and Consignment nodes and other nodes to be hidden when the user logs in.

We tried several ways of achieving this like:

  1. We created a Backoffice role for the laptop product users and a corresponding group to it(say laptopGroups).
  2. In the groups section of laptopGroups we gave it access to backofficeproductmanagergroup and the above role.
  3. The above step caused it to have access to multiple other product nodes, as well(like XYZCompanyProduct and XYZMobileProduct) which is unwanted behaviour.
  4. I tried removing the nodes by:

    <context component="explorer-tree" merge-by="principal" principal="laptopGroups"> <!-- other nodes... --> <navigation-node id="Restricted" merge-mode="remove"/> </context>

These steps seem to be all failing. Where am I going wrong? Should I approach this in a different way?

Arvind Kumar Avinash
  • 71,965
  • 6
  • 74
  • 110
Rachit
  • 403
  • 10
  • 32

1 Answers1

1

To achieve your objective, you can use permission in backoffice framework. Using that, you can restrict specific ItemType or it's specific attributes access to any particular user/groups in backoffice.

You can achieve the same by 2 ways :

  1. From backoffice directly --> backoffice > go to user groups >> click on key symbol (permissions) >> select your item type >> give required permissions

  2. Or using impex (sample as below)

$START_USERRIGHTS; ; ; ; ; ; ; ; ;

Type      ; UID          ; Target           ; read ; change ; create ; remove ;
UserGruop ; laptopGroups ; XYZLaptopProduct ; +     ;   -   ;   -    ;   -    ;

$END_USERRIGHTS; ; ; ; ;

Refer following for more details on above 2 approaches :

https://help.sap.com/viewer/5c9ea0c629214e42b727bf08800d8dfa/1905/en-US/8c282d8686691014b54f95ffbf322a6b.html

https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/1905/en-US/8be36d438669101497eeed8ff7b712fe.html

Hope it helps!

www.hybriscx.com
  • 1,129
  • 4
  • 22