use canEditMedia instead of hardcoded admin/staff to check file.editable

This commit is contained in:
j 2016-11-16 11:51:59 +02:00
parent 557c078319
commit a8f1c8e20d
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ class File(models.Model):
def editable(self, user):
p = user.profile
return p.get_level() in ('admin', 'staff') or \
return p.capability('canEditMedia') or \
(not self.available and p.capability('canAddItems')) or \
self.instances.filter(volume__user=user).count() > 0 or \
(not self.item or self.item.user == user)