Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4368 Переглядів

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()
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
4
трав. 21
19097
0
черв. 20
2238
1
лист. 18
4626
0
трав. 16
2922
6
лют. 16
11022