Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5098 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
4
ago 25
20022
0
giu 20
2750
1
nov 18
5173
0
mag 16
3499
6
feb 16
11652