typo: permissino permission in 403 errors

This commit is contained in:
Will Thompson 2015-04-28 18:12:00 +02:00 committed by j
parent 86a1d96484
commit 51c3df9660
3 changed files with 5 additions and 5 deletions

View file

@ -157,7 +157,7 @@ def upload(request, data=None):
item.tasks.load_subtitles.delay(f.item.public_id)
response = json_response(text='file saved')
else:
response = json_response(status=403, text='permissino denied')
response = json_response(status=403, text='permission denied')
return render_to_json_response(response)
actions.register(upload, cache=False)
@ -505,7 +505,7 @@ def removeMedia(request, data):
i.save()
add_changelog(request, data, data['ids'])
else:
response = json_response(status=403, text='permissino denied')
response = json_response(status=403, text='permission denied')
return render_to_json_response(response)
actions.register(removeMedia, cache=False)

View file

@ -505,7 +505,7 @@ def add(request, data):
see: edit, find, get, lookup, remove, upload
'''
if not request.user.get_profile().capability('canAddItems'):
response = json_response(status=403, text='permissino denied')
response = json_response(status=403, text='permission denied')
else:
data['title'] = data.get('title', 'Untitled')
i = models.Item()
@ -619,7 +619,7 @@ def setPosterFrame(request, data):
response = json_response()
add_changelog(request, data)
else:
response = json_response(status=403, text='permissino denied')
response = json_response(status=403, text='permission denied')
return render_to_json_response(response)
actions.register(setPosterFrame, cache=False)

View file

@ -12,6 +12,6 @@ def capability_required_json(capability):
if request.user.is_authenticated() and \
request.user.get_profile().capability(capability):
return function(request, *args, **kwargs)
return render_to_json_response(json_response(status=403, text='permissino denied'))
return render_to_json_response(json_response(status=403, text='permission denied'))
return wraps(function)(_wrapped_view)
return capability_required