diff options
| author | std-odoo <std@odoo.com> | 2020-05-07 12:52:51 +0000 |
|---|---|---|
| committer | std-odoo <std@odoo.com> | 2020-05-25 09:15:10 +0000 |
| commit | 38b2c9e8f8e1e7f90e984115ad4a3115926ae2c3 (patch) | |
| tree | 8215da804b2d808aeb99f4dabd96a2d926fa5517 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | ad5ac19218b4c529c651da951acdb93e1ac1227d (diff) | |
[FIX] portal: fix attachments upload as portal
Bugs
====
On e-commerce, the portal user is not able to upload
attachment with his comment, under a product.
On website blog, the portal user is not able to upload attachment with
his comment, in the discussion of the blog.
And, in `website_crm_partner_assign`, portal user is not able to upload
attachment with his comment, under the lead/opp.
Issue
=====
In the create method of the mail message, we check is the user can
read the attachment. If he can't, we raise an error.
But, the method that make the verification doesn't care about the access
token. So, when a portal user want to upload an attachment on a "public"
record (without a token on the record to sudoed it) the error is raised.
The portal user give an token for the attachment, so he should be able
to attach it to the message. This verification is done with
`_portal_post_check_attachments` so we can sudo write the attachment
after the creation of the mail message to bypass the verification.
Task-2214795
closes odoo/odoo#51772
X-original-commit: d59f8f62dbc7771fee51c3593f89f9b6832bb7ec
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
