Skip to content
Snippets Groups Projects
Commit 6ac32c65 authored by Manuel Vázquez Acosta's avatar Manuel Vázquez Acosta Committed by Martin Trigaux
Browse files

[FIX] survey: don't disclose the survey via print

To avoid bigger changes, only verify if the login is required.
A proper refactoring has been implemented in master at 9771fdfe

Closes odoo/odoo#30166
parent 6edfadbd
Branches
Tags
No related merge requests found
......@@ -252,6 +252,10 @@ class WebsiteSurvey(http.Controller):
def print_survey(self, survey, token=None, **post):
'''Display an survey in printable view; if <token> is set, it will
grab the answers of the user_input_id that has <token>.'''
if survey.auth_required and request.env.user == request.website.user_id:
return request.render("survey.auth_required", {'survey': survey, 'token': token})
return request.render('survey.survey_print',
{'survey': survey,
'token': token,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment