Partially Revert "Chore(deps): Bump the small-changes group across 1 directory with 6 updates (#9921)"

This partially reverts commit 1fe166e014.
This commit is contained in:
shamoon
2025-05-19 12:15:57 -07:00
parent ba80790826
commit 0b079f57ed
6 changed files with 1617 additions and 1626 deletions

View File

@@ -54,7 +54,7 @@ class HttpRemoteUserMiddleware(PersistentRemoteUserMiddleware):
header = settings.HTTP_REMOTE_USER_HEADER_NAME
def __call__(self, request: HttpRequest) -> None:
def process_request(self, request: HttpRequest) -> None:
# If remote user auth is enabled only for the frontend, not the API,
# then we need dont want to authenticate the user for API requests.
if (
@@ -62,8 +62,8 @@ class HttpRemoteUserMiddleware(PersistentRemoteUserMiddleware):
and "paperless.auth.PaperlessRemoteUserAuthentication"
not in settings.REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"]
):
return self.get_response(request)
return super().__call__(request)
return
return super().process_request(request)
class PaperlessRemoteUserAuthentication(authentication.RemoteUserAuthentication):

View File

@@ -1,7 +1,6 @@
import os
from unittest import mock
from django.conf import settings
from django.contrib.auth.models import User
from django.test import override_settings
from rest_framework import status
@@ -92,7 +91,6 @@ class TestRemoteUser(DirectoriesMixin, APITestCase):
@override_settings(
REST_FRAMEWORK={
**settings.REST_FRAMEWORK,
"DEFAULT_AUTHENTICATION_CLASSES": [
"rest_framework.authentication.BasicAuthentication",
"rest_framework.authentication.TokenAuthentication",