Commit 7ea3a387 authored by Michal Čihař's avatar Michal Čihař

Add missing parameter

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent ef795740
......@@ -54,10 +54,10 @@ def translate(request, unit_id):
'''
AJAX handler for translating.
'''
if not can_use_mt(request.user):
raise PermissionDenied()
unit = get_object_or_404(Unit, pk=int(unit_id))
unit.check_acl(request)
if not can_use_mt(request.user, unit.translation):
raise PermissionDenied()
service_name = request.GET.get('service', 'INVALID')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment