[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>
This commit is contained in:
fja-odoo
2020-02-25 09:05:02 +00:00
parent 969ea2a0d3
commit c54824dfee
+1 -1
View File
@@ -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: