Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3667 Widoki

for example.some snippet content in website should only visible for portal user only after login.other content should be public,and other should be only for admin user

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

You could check the group of the user logged in in the snippet block. 

Eg:

<t t-snippet=“module_name.snippet_template_name”


    t-if=“request.env.user.has_group(‘base.group_portal’)” t-thumbnail=“thumbnail image link”/>


The above snippet block will only be available for portal user.

<t t-snippet=“module_name.snippet_template_name”


    t-if=“request.env.user.has_group(‘base.user_admin’)” t-thumbnail=“thumbnail image link”/>


The above snippet block will be available for admin user

Regards

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
5
sty 22
11700
3
mar 15
4480
1
maj 24
2239
0
sie 23
2278
0
cze 20
2579