From f1c8c48d35c41e9c4570e235a9d3f606f934ace8 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 27 Feb 2021 20:17:52 +1100 Subject: [PATCH] Fix API permissions for stock adjustment --- InvenTree/InvenTree/permissions.py | 6 ------ InvenTree/stock/api.py | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/InvenTree/InvenTree/permissions.py b/InvenTree/InvenTree/permissions.py index 836943b7a8..1c3c6ee5db 100644 --- a/InvenTree/InvenTree/permissions.py +++ b/InvenTree/InvenTree/permissions.py @@ -36,12 +36,6 @@ class RolePermission(permissions.BasePermission): Determine if the current user has the specified permissions """ - # First, check that the user is authenticated! - auth = permissions.IsAuthenticated() - - if not auth.has_permission(request, view): - return False - user = request.user # Superuser can do it all diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index 75b0d9de3b..fe669da5b9 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -126,9 +126,7 @@ class StockAdjust(APIView): """ - permission_classes = [ - permissions.IsAuthenticated, - ] + queryset = StockItem.objects.none() allow_missing_quantity = False