mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-09-16 17:22:32 +03:00
run middleware after authentication
This commit is contained in:
parent
0e973b9953
commit
2359ae86ac
|
@ -430,11 +430,11 @@ class APIView(View):
|
||||||
|
|
||||||
# Ensure that the incoming request is permitted
|
# Ensure that the incoming request is permitted
|
||||||
self.perform_authentication(request)
|
self.perform_authentication(request)
|
||||||
|
# only authentication before, other task ran after mutation
|
||||||
|
self.initialize_middleware_classes(request)
|
||||||
self.check_permissions(request)
|
self.check_permissions(request)
|
||||||
self.check_throttles(request)
|
self.check_throttles(request)
|
||||||
|
|
||||||
# authentication and other task ran before final mutation
|
|
||||||
self.initialize_middleware_classes(request)
|
|
||||||
|
|
||||||
def finalize_response(self, request, response, *args, **kwargs):
|
def finalize_response(self, request, response, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user