0
votes

I am working with Hybris backoffice and I am trying to hide specific navigation nodes based on user groups. So I have tried to define a merge-by attribute in the context tag along with principal group as shown below.

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

I have also created a user who is assigned to the restricted group (myRestrictedGroup).

But when logging in as the restricted user or any other user the node is hidden. For any group/user the node is not visible including "admin". I was expecting the node to be visible to all users that do not belong to the "myRestrictedGroup" but this does not seem to be the case.

I am running Hybris 6.6.

I was following documentation I found online as it seemed to be what I was looking for. However, I did notice the documentation lists few older versions of 6.0. ( I did not see 6.6) https://apps.support.sap.com/sap/support/knowledge/preview/en/2455449 (SAP credentials are needed to view entirely)

1

1 Answers

1
votes

There is actually on additional layer of abstraction between standard hybris user groups and backoffice, it's called the Authority Group

So, what it may boil down to for your example to work:

  1. create a new "Backoffice Role" (subtype of User group)
  2. set the Authorities (the property is found in the Administration tab) of this role to myRestrictedGroup
  3. Assign the role to the users to hide the navigation node