From cffb9c34f0fd66f0ae0acfc678b3447f54b75435 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sat, 1 Nov 2025 09:37:49 -0700
Subject: [PATCH 037/133] Chore: add headers for wikipedia CI tests (#11253)
---
src/paperless_mail/tests/test_parsers_live.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/paperless_mail/tests/test_parsers_live.py b/src/paperless_mail/tests/test_parsers_live.py
index e1febb1e5..2c3ef262a 100644
--- a/src/paperless_mail/tests/test_parsers_live.py
+++ b/src/paperless_mail/tests/test_parsers_live.py
@@ -53,6 +53,15 @@ class TestUrlCanary:
Verify certain URLs are still available so testing is valid still
"""
+ # Wikimedia rejects requests without a browser-like User-Agent header and returns 403.
+ _WIKIMEDIA_HEADERS = {
+ "User-Agent": (
+ "Mozilla/5.0 (X11; Linux x86_64) "
+ "AppleWebKit/537.36 (KHTML, like Gecko) "
+ "Chrome/123.0.0.0 Safari/537.36"
+ ),
+ }
+
def test_online_image_exception_on_not_available(self):
"""
GIVEN:
@@ -70,6 +79,7 @@ class TestUrlCanary:
with pytest.raises(httpx.HTTPStatusError) as exec_info:
resp = httpx.get(
"https://upload.wikimedia.org/wikipedia/en/f/f7/nonexistent.png",
+ headers=self._WIKIMEDIA_HEADERS,
)
resp.raise_for_status()
@@ -90,7 +100,10 @@ class TestUrlCanary:
"""
# Now check the URL used in samples/sample.html
- resp = httpx.get("https://upload.wikimedia.org/wikipedia/en/f/f7/RickRoll.png")
+ resp = httpx.get(
+ "https://upload.wikimedia.org/wikipedia/en/f/f7/RickRoll.png",
+ headers=self._WIKIMEDIA_HEADERS,
+ )
resp.raise_for_status()
From 74b10db02827cbda9fcda9ae565c21fb4262bb63 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sat, 1 Nov 2025 12:49:05 -0700
Subject: [PATCH 038/133] Fix: improve legibility of processed mail error
popover in light mode (#11258)
---
.../processed-mail-dialog/processed-mail-dialog.component.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html
index 604e3fd68..26b63fd56 100644
--- a/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html
+++ b/src-ui/src/app/components/manage/mail/processed-mail-dialog/processed-mail-dialog.component.html
@@ -68,7 +68,7 @@
-
+
{{ mail.error }}
From ad45e3f747c5f6ec6b8a821505d5f291bef5b80c Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sat, 1 Nov 2025 13:13:39 -0700
Subject: [PATCH 039/133] Fix: respect fields parameter for created field
(#11251)
---
src/documents/serialisers.py | 2 +-
src/documents/tests/test_api_documents.py | 29 +++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py
index 25207bdfa..f04bb70da 100644
--- a/src/documents/serialisers.py
+++ b/src/documents/serialisers.py
@@ -1041,7 +1041,7 @@ class DocumentSerializer(
request.version if request else settings.REST_FRAMEWORK["DEFAULT_VERSION"],
)
- if api_version < 9:
+ if api_version < 9 and "created" in self.fields:
# provide created as a datetime for backwards compatibility
from django.utils import timezone
diff --git a/src/documents/tests/test_api_documents.py b/src/documents/tests/test_api_documents.py
index 8145e4793..f7f44c974 100644
--- a/src/documents/tests/test_api_documents.py
+++ b/src/documents/tests/test_api_documents.py
@@ -172,6 +172,35 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase):
results = response.data["results"]
self.assertEqual(len(results[0]), 0)
+ def test_document_fields_api_version_8_respects_created(self):
+ Document.objects.create(
+ title="legacy",
+ checksum="123",
+ mime_type="application/pdf",
+ created=date(2024, 1, 15),
+ )
+
+ response = self.client.get(
+ "/api/documents/?fields=id",
+ headers={"Accept": "application/json; version=8"},
+ format="json",
+ )
+ self.assertEqual(response.status_code, status.HTTP_200_OK)
+ results = response.data["results"]
+ self.assertIn("id", results[0])
+ self.assertNotIn("created", results[0])
+
+ response = self.client.get(
+ "/api/documents/?fields=id,created",
+ headers={"Accept": "application/json; version=8"},
+ format="json",
+ )
+ self.assertEqual(response.status_code, status.HTTP_200_OK)
+ results = response.data["results"]
+ self.assertIn("id", results[0])
+ self.assertIn("created", results[0])
+ self.assertRegex(results[0]["created"], r"^2024-01-15T00:00:00.*$")
+
def test_document_legacy_created_format(self):
"""
GIVEN:
From 819f6063351d1ff8f263ead50b85c21798eef83f Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sat, 1 Nov 2025 13:18:49 -0700
Subject: [PATCH 040/133] Chore: hide slim toggler if insufficient permissions
---
.../app-frame/app-frame.component.html | 16 +++++++++-------
.../components/app-frame/app-frame.component.ts | 13 +++++++++++++
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html
index 7ec92cda8..673eaf03b 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.html
+++ b/src-ui/src/app/components/app-frame/app-frame.component.html
@@ -68,13 +68,15 @@
|