Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5105 Lượt xem

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()
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 8 25
20036
0
thg 6 20
2753
1
thg 11 18
5179
0
thg 5 16
3505
6
thg 2 16
11671