Skip to Content
Menu
This question has been flagged
1 Atsakyti
4931 Rodiniai

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()
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
4
geg. 21
19734
0
birž. 20
2610
1
lapkr. 18
5041
0
geg. 16
3353
6
vas. 16
11519