Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3655 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
5
січ. 22
11680
3
бер. 15
4476
1
трав. 24
2222
0
серп. 23
2264
0
черв. 20
2548