How can i limit Main tabs view per user in Nuxeo DM 5.5?

I have 2 users i.e John and Ana.

I want to provide access rights to both of them such that:

John can only see the Home, Document Managaement Tab. Ana can only see the Home, Admin Center Tab.

is it possible to do this via extension points? Please help

0 votes

1 answers

2350 views

ANSWER



As the Main tabs are defined through actions, you can append any filter you want to the actions to show / hide them.

For instance, to hide the Document Management tab for users in group1:

<require>org.nuxeo.ecm.platform.actions</require>

<extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="actions">
  <action id="documents">
    <filter-id>denyForGroup1</filter-id>
  </action>
</extension>

<extension target="org.nuxeo.ecm.platform.actions.ActionService"
  point="filters">
  <filter id="denyForGroup1">
    <rule grant="false">
      <condition>#{currentUser.isMemberOf('group1')}</condition>
    </rule>
  </filter>
</extension>

Don't forget the require element to correctly override the existing actions.

2 votes