[FIX] ir_attachment: fix security issues on ir_attachment
authorMartin Trigaux <mat@openerp.com>
Tue, 29 Oct 2013 17:14:20 +0000 (18:14 +0100)
committerMartin Trigaux <mat@openerp.com>
Tue, 29 Oct 2013 17:14:20 +0000 (18:14 +0100)
commit15905e78c5ad38ffdc039ade20f272fcba9ccbfe
tree7cad4d9bbb2a6170996d5a7040dc050fdc52a497
parent23e6b81833a4fa2c6e521ccb29b538262f10f4b5
[FIX] ir_attachment: fix security issues on ir_attachment
check: verify the permissions even when no ids are passed (skipped permission checking for create)
create: verify has the write access on the related model (instead of create, was not checked anyway)
function field: execute the write in fnct_inv as superuser (was impossible to have creation without write access)

bzr revid: mat@openerp.com-20131029171420-x87wu7ph8ej7mtro
openerp/addons/base/ir/ir_attachment.py