forked from 0x2620/pandora
use canEditMedia instead of hardcoded admin/staff to check file.editable
This commit is contained in:
parent
557c078319
commit
a8f1c8e20d
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue