[FIX] project: add access token to task attachment display
Following CDN expansion (d98b262398)
portal attachment links now go through the CDN, which is an issue for
restricted-access attachments e.g. attachments bound to specific objects
(such as support tickets).
Add an access token to the attachment links in the /my/task template.
Cf OPW-1882014 (fixed ad-hoc by editing the relevant view on odoo.com)
This commit is contained in:
@@ -211,7 +211,7 @@
|
||||
</strong>
|
||||
<div class='row'>
|
||||
<div class="col-md-2 col-sm-3 text-center oe_attachments" t-foreach='task.attachment_ids' t-as='attachment'>
|
||||
<a t-attf-href="/web/content/#{attachment.id}?download=true" target="_blank">
|
||||
<a t-attf-href="/web/content/#{attachment.id}?download=true&access_token=#{attachment.generate_access_token()}" target="_blank">
|
||||
<div class='oe_attachment_embedded o_image o_image_small' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/50x40"/>
|
||||
<div class='oe_attachment_name'><t t-esc='attachment.name' /></div>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user