[FIX] website_forum: access right issue on validation queue
- If you are a portal user when trying to access the validation queue an access right error can be triggered when trying to read the post's user name if the record rules don't let you read on this specific user. closes odoo/odoo#33626 Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
This commit is contained in:
@@ -439,7 +439,7 @@ class WebsiteForum(WebsiteProfile):
|
||||
|
||||
values = self._prepare_user_values(forum=forum)
|
||||
values.update({
|
||||
'posts_ids': posts_to_validate_ids,
|
||||
'posts_ids': posts_to_validate_ids.sudo(),
|
||||
'queue_type': 'validation',
|
||||
})
|
||||
|
||||
@@ -459,7 +459,7 @@ class WebsiteForum(WebsiteProfile):
|
||||
|
||||
values = self._prepare_user_values(forum=forum)
|
||||
values.update({
|
||||
'posts_ids': flagged_posts_ids,
|
||||
'posts_ids': flagged_posts_ids.sudo(),
|
||||
'queue_type': 'flagged',
|
||||
'flagged_queue_active': 1,
|
||||
})
|
||||
@@ -478,7 +478,7 @@ class WebsiteForum(WebsiteProfile):
|
||||
|
||||
values = self._prepare_user_values(forum=forum)
|
||||
values.update({
|
||||
'posts_ids': offensive_posts_ids,
|
||||
'posts_ids': offensive_posts_ids.sudo(),
|
||||
'queue_type': 'offensive',
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user