İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3535 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
5
Oca 22
11563
3
Mar 15
4397
1
May 24
2067
0
Ağu 23
2148
0
Haz 20
2469