Merge pull request #1370 from SchrodingersGat/stock-adjust-permissions

Fix API permissions for stock adjustment
This commit is contained in:
Oliver 2021-02-27 22:25:55 +11:00 committed by GitHub
commit 732388c7d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -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

View File

@ -126,9 +126,7 @@ class StockAdjust(APIView):
"""
permission_classes = [
permissions.IsAuthenticated,
]
queryset = StockItem.objects.none()
allow_missing_quantity = False