allow uploading videos to canAddItems
This commit is contained in:
parent
58c36761ba
commit
2c3ff91c91
2 changed files with 2 additions and 1 deletions
|
@ -286,6 +286,7 @@ class File(models.Model):
|
|||
def editable(self, user):
|
||||
p = user.get_profile()
|
||||
return p.get_level() in ('admin', 'staff') 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)
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ def addMedia(request):
|
|||
data = json.loads(request.POST['data'])
|
||||
oshash = data.pop('id')
|
||||
if not request.user.get_profile().capability('canAddItems'):
|
||||
response = json_response(status=403, text='permissino denied')
|
||||
response = json_response(status=403, text='permission denied')
|
||||
elif models.File.objects.filter(oshash=oshash).count() > 0:
|
||||
f = models.File.objects.get(oshash=oshash)
|
||||
if f.available:
|
||||
|
|
Loading…
Reference in a new issue