From 5c705c51cd8377b1c6e1bb2513db34afe48189ee Mon Sep 17 00:00:00 2001 From: Julien Castiaux Date: Mon, 8 Jul 2019 11:30:19 +0000 Subject: [PATCH] [FIX] website_profile: bypass IR Rules on karma ranking Install website_slides, create a bunch of users all published on the website. Using raw sql queries, give some karma to those users. Go to the `/profile/users` web page. When connected the ranking is correctly shown, when not connected all users are ranked 0. The problem is that the public user (id: 4) can only access is own user which prevent him to access the karma of the other user required to rank them. As the injected IR Rules are not adding any value and that a domain is applied already, it is safe to skip the ir rules. opw-2029105 closes odoo/odoo#34656 Signed-off-by: Nicolas Lempereur (nle) --- addons/website_profile/controllers/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/website_profile/controllers/main.py b/addons/website_profile/controllers/main.py index 64e6b913c98..18292c8214e 100644 --- a/addons/website_profile/controllers/main.py +++ b/addons/website_profile/controllers/main.py @@ -250,7 +250,6 @@ class WebsiteProfile(http.Controller): Users = request.env['res.users'] where_query = Users._where_calc(domain) - Users._apply_ir_rules(where_query, 'read') from_clause, where_clause, where_clause_params = where_query.get_sql() # we search on every user in the DB to get the real positioning (not the one inside the subset)