Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4887 Vues

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
Ignorer
Publications associées Réponses Vues Activité
4
mai 21
19688
0
juin 20
2581
1
nov. 18
5021
0
mai 16
3309
6
févr. 16
11487