From 5f4ac9ea6df3e327286ea3b4a1fae3ef1f07983f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 17 Mar 2020 23:25:18 +0000 Subject: [PATCH] [FIX] website_forum: fix permissions for tag notifs Forum users can follow tags and will be notified when a new post includes the tag. However the person posting it does not have access to the list of followers, so the notification would fail with an AccessError. The OP would get a 403 page and the post would not be posted. closes odoo/odoo#47907 X-original-commit: 2b2b8484cefc4b2cfdf1023fb8209e70eef5ec24 Signed-off-by: Nicolas Martinelli (nim) --- addons/website_forum/models/forum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py index 4b70b2df39f..7f862506369 100644 --- a/addons/website_forum/models/forum.py +++ b/addons/website_forum/models/forum.py @@ -533,7 +533,7 @@ class Post(models.Model): def post_notification(self): for post in self: - tag_partners = post.tag_ids.mapped('message_partner_ids') + tag_partners = post.tag_ids.sudo().mapped('message_partner_ids') if post.state == 'active' and post.parent_id: post.parent_id.message_post_with_view(