Skip to Content
मेन्यू
This question has been flagged
1 Reply
1798 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
1
मार्च 23
3499
3
अग॰ 25
2538
1
मई 25
2598
1
अप्रैल 25
3568
1
अप्रैल 25
4418