Skip to content

Commit

Permalink
[FIX] survey: correct check_access call
Browse files Browse the repository at this point in the history
Was always failing because of an invalid signature

closes odoo#174217

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
  • Loading branch information
mart-e committed Jul 25, 2024
1 parent a5e9820 commit 17c2bcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/survey/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def _get_access_data(self, survey_token, answer_token, ensure_token=True, check_
survey_sudo, answer_sudo = self._fetch_from_access_token(survey_token, answer_token)
try:
survey_user = survey_sudo.with_user(request.env.user)
survey_user.check_access_rights(self, 'read', raise_exception=True)
survey_user.check_access_rule(self, 'read')
survey_user.check_access_rights('read', raise_exception=True)
survey_user.check_access_rule('read')
except:
pass
else:
Expand Down

0 comments on commit 17c2bcf

Please sign in to comment.