Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5120 Представления

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
авг. 25
20045
0
июн. 20
2761
1
нояб. 18
5189
0
мая 16
3514
6
февр. 16
11691