summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2019-12-12 17:26:16 +0000
committerNicolas Lempereur <nle@odoo.com>2019-12-20 14:14:12 +0000
commit26fac9a8346b6b78e89645978bd66308ef08c587 (patch)
tree070ce745e911edbfc015ed3c479997d80208c0c6 /addons/web/static/src/js/views/basic/basic_controller.js
parent75f91ca8e9632db861c0f05a0bc19d9a7975e407 (diff)
[FIX] base: attachment check linked record 'write'
When an attachment is linked to a record (res_id and res_model are set) we check the access rights and access rules of that record. The access we check on linked record has changed as follow: - 15905e78 (2013) => we check `write` access right/rule for `create` - f5ebc509 (2014) => we check `write` access right for all mode - 66644e85 (2015) => we check write access right for all but create mode So currently we check on the linked record for each mode: - create: write access right / write access rule - read: read access right / read access rule - write: write access right / write access rule - unlink: write access right / unlink access rule The behavior is not expected for `unlink`, we should check if we have write access through access rules instead of checking unlink access. Without the change, the added test failed with a `unlink` access rule AccessError on the linked record. opw-2154448 closes #41814 closes odoo/odoo#42264 X-original-commit: 2b3fc2e3b80f191b4cd126abccf6f94b1302ac11 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions