Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
11343 มุมมอง

Hi,

I would like to know if I could display a login page to my users as a frontpage and deny the non-logged users access to the website.

I tried editing the access rights for "website" and "access_website_menu" with a specific group that all my users have, but if I change any of them (or both) I cannot access the login page.

Thanks for your help,


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Have you see the Website Security App?

"Give availability to restrict website menus and pages to some groups"

https://www.odoo.com/apps/modules/9.0/website_security/

อวตาร
ละทิ้ง
ผู้เขียน

Hi Ray, Thanks for the module name, I hadn't seen it yet. I installed it and I could hide the menu elements from an anonymous user. But it seems to work fine with pages, but when I tried to hide the shop (/shop) it hides it, but you can still access it if you enter the correct URL. Any idea what I am not doing right ? Cheers

คำตอบที่ดีที่สุด

Hello clement

if not request.session.uid:    
    return login_redirect()

you can write on your website controllers maybe it will work for v9 bcoz it works for v8 if user not login then it automatically redirect this to login page when user tries to access website

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Have you tried login to shop module?

https://apps.odoo.com/apps/modules/12.0/login_to_shop/

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ม.ค. 25
5654
0
มี.ค. 21
3185
0
ก.พ. 25
1014
2
ต.ค. 24
914
1
ก.ย. 24
1350