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

I would like to restrict access for static pages (ex. /contactus), to allow it only for authenticated users, I have tried updating the index method on the website addon, to use auth="user" instead of auth="public", but it is not working:

class RestrictWebsite(Website):
@http.route(auth="user")
def index(self):
return super(RestrictWebsite, self).index()
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Try refer the following.

https://www.odoo.com/fr_FR/forum/aide-1/allow-only-logged-in-users-to-see-website-blog-forum-180360

Regards

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Problem with security and ir_attachment แก้ไขแล้ว
4
ส.ค. 25
19742
0
มิ.ย. 20
2611
1
พ.ย. 18
5046
0
พ.ค. 16
3368
6
ก.พ. 16
11526