Skip to content
Snippets Groups Projects
Commit eb8068bc authored by Jeremy Kersten's avatar Jeremy Kersten Committed by Alexandre Kühn
Browse files

[FIX] mail: fix access rights for reaction in portal


Before this commit, the portal user get a Access Error.
After this commit, the portal user see the chatter without error.

The code works with reaction browsed in sudo, but since we use a ior
with a record not in sudo, we loose the sudo flag and so the right for
portal user to read it.

```py
x = record.sudo()
y = record
x |= y -> (x, y) in sudo
y |= x -> (x, y) not in sudo
```

How to reproduce ?
Assign lead to a portal user
Post a message with another user like demo on the lead
Add reaction with the admin user
Open the opportunity on the portal with portal user
-> access error

opw-3215507

closes odoo/odoo#117224

X-original-commit: ca1fe2ae
Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
parent 02b5037f
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment