跳至内容
菜单
此问题已终结
1 回复
1810 查看

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:







形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
3月 23
3522
3
8月 25
2582
1
5月 25
2624
1
4月 25
3605
1
4月 25
4471