Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1806 Prikazi

In the Website module, I need to display links only if the user does not belong to the helpdesk administrator group. How can I achieve this?


Example:







Avatar
Opusti
Best Answer

Hi 

To display links only if the user does not belong to the helpdesk administrator group in the Website module, you can use the following code:


```


<t t-if="not request.env.user.has_group('helpdesk.helpdesk_admin_group')">


    <!-- Your link code here -->


</t>


```


This code uses a template condition (`<t t-if>`) to check if the current user does not have the helpdesk administrator group (`'helpdesk.helpdesk_admin_group'`). If the user does not belong to the group, the links inside the `<t>` block will be displayed.


Please note that you need to replace `'helpdesk.helpdesk_admin_group'` with the actual technical name of your helpdesk administrator group.

Hope it helps

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
mar. 23
3517
3
avg. 25
2571
1
maj 25
2615
1
apr. 25
3594
1
apr. 25
4457