diff options
| author | fja-odoo <fja@odoo.com> | 2020-02-25 09:05:02 +0000 |
|---|---|---|
| committer | fja-odoo <fja@odoo.com> | 2020-02-25 09:05:02 +0000 |
| commit | c54824dfee24c08c62d1e8a60f09710e40b675cc (patch) | |
| tree | 7b357ca45b8cb4c773ab339ce901f25aa632576f | |
| parent | 969ea2a0d3b0023854996afc5b89eeb4b11c3e34 (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.py | 2 |
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: |
