[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user