Browse Source

refactor(api): clean up AuthenticatedActionView

Peter Thomassen 3 years ago
parent
commit
1aeb0a5aa0
1 changed files with 1 additions and 2 deletions
  1. 1 2
      api/desecapi/views.py

+ 1 - 2
api/desecapi/views.py

@@ -636,7 +636,7 @@ class AuthenticatedActionView(generics.GenericAPIView):
 
 
     @property
     @property
     def authentication_classes(self):
     def authentication_classes(self):
-        # This prevents both code evaluation and user-specific throttling when we only want a redirect
+        # This prevents both auth action code evaluation and user-specific throttling when we only want a redirect
         return () if self.request.method in SAFE_METHODS else (auth.AuthenticatedBasicUserActionAuthentication,)
         return () if self.request.method in SAFE_METHODS else (auth.AuthenticatedBasicUserActionAuthentication,)
 
 
     @property
     @property
@@ -661,7 +661,6 @@ class AuthenticatedActionView(generics.GenericAPIView):
             raise NotAcceptable
             raise NotAcceptable
 
 
     def post(self, request, *args, **kwargs):
     def post(self, request, *args, **kwargs):
-        super().perform_authentication(request)
         serializer = self.get_serializer(data=request.data)
         serializer = self.get_serializer(data=request.data)
         serializer.is_valid(raise_exception=True)
         serializer.is_valid(raise_exception=True)
         try:
         try: