0

I'm getting a permission denial error but, if I'm understanding things correctly, the permissions should already have been assigned.

Checking the permission content

Granting the permissions through shell

Postman endpoint

class UserList(generics.ListCreateAPIView):
queryset = User.objects.all()
serializer_class = UserSerializer
permission_classes = [DjangoModelPermissions]

class UserDetail(generics.RetrieveUpdateDestroyAPIView):
queryset = User.objects.all()
serializer_class = UserSerializer
permission_classes = [DjangoModelPermissions]

I've tried some different permission classes so far, but except for just bypassing it entirely with AllowAny nothing seems to have worked.

Mr.Andor
  • 25
  • 5

1 Answers1

0

Managed it. The problem was with the JWT auth. I was using JWTStatelessUserAuthentication, switched it to JWTAuthentication in the settings and it seems to be working as expected now.

Mr.Andor
  • 25
  • 5
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 05 '22 at 10:51