From 726f42c469ffaa5eefdcd29a1770eb95a88f8270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Mon, 8 Aug 2016 03:15:11 +0200 Subject: [PATCH] Correction code HTTP K-Psul MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Corrige le code HTTP de 400 (BAD REQUEST) à 403 (FORBIDDEN) dans le cas où l'utilisateur authentifié n'a pas les permissions nécessaires pour enregistrer une commande K-Psul --- kfet/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kfet/views.py b/kfet/views.py index 198cd657..e444b042 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -465,7 +465,7 @@ def kpsul_perform_operations(request): required_perms if not request.user.has_perm(perm) )] data['errors'].append({'missing_perms': missing_perms }) - return JsonResponse(data, status=400) + return JsonResponse(data, status=403) # If 1 perm is required, saving who perform the operations if len(required_perms) > 0: