summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfja-odoo <fja@odoo.com>2020-02-25 09:05:02 +0000
committerfja-odoo <fja@odoo.com>2020-02-25 09:05:02 +0000
commitc54824dfee24c08c62d1e8a60f09710e40b675cc (patch)
tree7b357ca45b8cb4c773ab339ce901f25aa632576f
parent969ea2a0d3b0023854996afc5b89eeb4b11c3e34 (diff)
[IMP] website_forum: hide negative karma posts
Currently posts are hidden at the post level only (by giving a 404). The posts are still visible in the list of posts on the main forum page. Now we hide the posts of users with negative amount of karma. task-2093636 closes odoo/odoo#46194 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
-rw-r--r--addons/website_forum/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py
index dfac6dc75a9..b309a644be0 100644
--- a/addons/website_forum/controllers/main.py
+++ b/addons/website_forum/controllers/main.py
@@ -90,7 +90,7 @@ class WebsiteForum(WebsiteProfile):
Post = request.env['forum.post']
- domain = [('forum_id', '=', forum.id), ('parent_id', '=', False), ('state', '=', 'active')]
+ domain = [('forum_id', '=', forum.id), ('parent_id', '=', False), ('state', '=', 'active'), ('can_view', '=', True)]
if search:
domain += ['|', ('name', 'ilike', search), ('content', 'ilike', search)]
if tag: