diff options
| author | Raphael Collet <rco@odoo.com> | 2019-06-17 09:45:09 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2019-07-04 11:32:22 +0000 |
| commit | b7fd679a6c41dbb694c6fb2ce4911798de0424b1 (patch) | |
| tree | cb4e75910deb2516d5397925e96ab5e680eed9e1 /addons/project/controllers | |
| parent | 1e6c3bec2c5ca621344b09e58dbed535e80fb343 (diff) | |
[FIX] *: sudo() -> with_user()
Diffstat (limited to 'addons/project/controllers')
| -rw-r--r-- | addons/project/controllers/rating.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/project/controllers/rating.py b/addons/project/controllers/rating.py index c89f186a6ce..3df60f3f063 100644 --- a/addons/project/controllers/rating.py +++ b/addons/project/controllers/rating.py @@ -82,7 +82,7 @@ class RatingProject(http.Controller): project = request.env['project.project'].sudo().browse(project_id) # to avoid giving any access rights on projects to the public user, let's use sudo # and check if the user should be able to view the project (project managers only if it's unpublished or has no rating) - if not ((project.rating_status != 'no') and project.portal_show_rating) and not user.sudo(user).has_group('project.group_project_manager'): + if not ((project.rating_status != 'no') and project.portal_show_rating) and not user.with_user(user).has_group('project.group_project_manager'): raise NotFound() return request.render('project.rating_project_rating_page', { |
