From 2b2b8484cefc4b2cfdf1023fb8209e70eef5ec24 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#47856 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 aa6847cc13ebf..cc55b9c84f375 100644 --- a/addons/website_forum/models/forum.py +++ b/addons/website_forum/models/forum.py @@ -511,7 +511,7 @@ def write(self, vals): 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(