Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4890 Tampilan

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
Buang
Post Terkait Replies Tampilan Aktivitas
4
Mei 21
19698
0
Jun 20
2583
1
Nov 18
5023
0
Mei 16
3316
6
Feb 16
11491