Skip to Content
Menu
This question has been flagged
1 Atsakyti
5310 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
rugp. 25
20349
0
birž. 20
2884
1
lapkr. 18
5399
0
geg. 16
3678
6
vas. 16
11860