I'm getting a permission denial error but, if I'm understanding things correctly, the permissions should already have been assigned.
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.
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.