[FIX] base: explicitly allow superuser to write on attachment's assets

This commit is contained in:
Christophe Simonis
2018-08-07 19:06:02 +02:00
parent 1b76b6168f
commit 5a64fffe9a
+2
View File
@@ -246,6 +246,8 @@ class ir_attachment(osv.osv):
def _check_serving_attachments(self, cr, uid, ids, context=None):
# restrict writing on attachments that could be served by the
# ir.http's dispatch exception handling
if uid == SUPERUSER_ID:
return True
user = self.pool['res.users'].browse(cr, uid, uid, context=context)
for ira in self.browse(cr, uid, ids, context):
if ira.type == 'binary' and ira.url: