[MERGE] forward port branch 9.0 up to 5a64fffe9a

This commit is contained in:
Christophe Simonis
2018-08-07 19:10:25 +02:00
+2
View File
@@ -311,6 +311,8 @@ class IrAttachment(models.Model):
def _check_serving_attachments(self):
# restrict writing on attachments that could be served by the
# ir.http's dispatch exception handling
if self.env.user._is_superuser():
return
if self.type == 'binary' and self.url:
has_group = self.env.user.has_group
if not any([has_group(g) for g in self.get_serving_groups()]):