跳至內容
選單
此問題已被標幟
1 回覆
5091 瀏覽次數

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()
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
8月 25
19999
0
6月 20
2741
1
11月 18
5164
0
5月 16
3492
6
2月 16
11625