cancel
Showing results for 
Search instead for 
Did you mean: 

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

catherine_
Champ on-the-rise
Champ on-the-rise

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

1 ACCEPTED ANSWER

Thomas_Roger
Star Contributor
Star Contributor

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.

View answer in original post

1 REPLY 1

Thomas_Roger
Star Contributor
Star Contributor

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.