Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4928 Zobrazení

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()
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
kvě 21
19734
0
čvn 20
2610
1
lis 18
5041
0
kvě 16
3350
6
úno 16
11514