Commit Graph
40 Commits
Author SHA1 Message Date
shamoon f4ff87e69b Enhancement (QoL): support deselecting single items from "select all" (#14117) 2026-09-18 01:28:55 +00:00
Trenton H 683f2ac250 Fix: validate legacy bulk_edit owner/rotate/split parameters (#14120)
BulkEditSerializer's hand-parsed validators only caught the exceptions
their happy paths raised, so wrong-typed input produced a 500 or was
passed through to the task:

- owner: a nonexistent or wrong-typed id raised an uncaught error, and a
  boolean was accepted (Django coerces True to pk 1). It is now validated
  with PrimaryKeyRelatedField and the validated pk is passed on.
- rotate: null raised TypeError, while true, "90" and 45 were accepted and
  failed later in QPDF. Degrees are now an IntegerField plus a
  multiple-of-90 check, passing an int on. The dedicated rotate endpoint
  and edit_pdf operations share the same multiple-of-90 check.
- split: null raised AttributeError, "0" silently became the last page,
  "3-1" gave an empty group that crashed the task, and a range like
  "1-5000000" was expanded into a list during the request with no upper
  bound. Each range is now checked against 1 <= start <= end <= page_count
  before it is built.
2026-09-15 19:23:37 +00:00
Trenton H ef26bc1570 Fix: enforce set_permissions shape via a nested DRF serializer (#14119)
SetPermissionsSerializer was a bare DictField, and the legacy bulk_edit
set_permissions parameter bypassed even that by hand-calling
validate_set_permissions() on an unchecked dict. A bool or a non-list in
place of users/groups crashed with a raw TypeError instead of a 400.

It is now a nested serializer (view/change, each with users/groups as
lists of integers), used for owned-object create/update, the legacy
bulk_edit set_permissions parameter, and bulk_edit_objects permissions.
Unknown action keys are rejected: previously a typo like "veiw" was
silently dropped, leaving an empty permission set that could clear
existing grants. An explicit set_permissions null (an owner-only change)
remains a no-op, and an empty bulk_edit_objects permissions dict is still
rejected.
2026-09-15 18:46:32 +00:00
Trenton H 970eb55a70 Fix: type edit_pdf operations via a nested serializer (#14116)
operations was a ListField with no child, so both EditPdfDocumentsSerializer
and BulkEditSerializer._validate_parameters_edit_pdf hand-checked each entry
with isinstance(). That accepted booleans (isinstance(True, int) is true) and
passed through any extra keys.

Adds PdfEditOperationSerializer (page >= 1, doc >= 0, rotate a multiple of
90) and uses it as the ListField child on both paths, dropping the manual
type checks and the now-redundant negative/page < 1 bounds checks. Rotations
that are not a multiple of 90 previously passed validation and then failed
inside the task when QPDF refused them.
2026-09-15 15:43:21 +00:00
Trenton H 1f8b6c95b1 Feature: parse advanced search with whoosh-compat and delete the handwritten translation (#14072)
* Feature: parse advanced search with whoosh-compat and delete the hand-written translator

* Don't cover these, they exist for defensive, but there's no other current diagnostic

* A mix of more no cover and tests

* Route SCHEMA_FIELD_MISSING into an error, not an HTTP 400
2026-09-15 07:26:41 -07:00
shamoon 5293194551 Fix: validate PDF output doc indexes in bulk edit (#14083) 2026-09-13 22:12:10 +00:00
shamoon 4421d4fe58 Fix: update some api global perms inconsistencies (#14086) 2026-09-12 16:17:48 -07:00
shamoon 9a47b20d2a Enhancement: duplicates filter (#13994) 2026-09-07 20:46:49 +00:00
shamoon c93c996edf Remote ocr reprocess (#13636)
* Backend stuff for remote ocr reprocess, add to bulk edit pass in from ui settings

* Ok, frontend reprocess remote option

* Docs
2026-08-24 14:43:05 -07:00
shamoon ef49414162 Fix: reject bulk edit permissions requests without the correct key (#13563) 2026-08-05 14:49:15 +00:00
shamoon e37ef5aa71 Fix: validate custom field values in bulk operations (#13457) 2026-07-31 15:57:17 +00:00
shamoon 8aab34ea73 Security (beta): two small permission check fixes (#13186) 2026-07-21 16:50:28 +00:00
shamoon a76b6b826c Fix (dev): resolve tantivy search-filtered documents in bulk edit (#12705) 2026-05-04 14:34:08 -07:00
Trenton H 14fe520319 Chore: Update typing and baselines again (#12641)
a
2026-04-28 09:28:05 -07:00
Trenton H fbf4e32646 Chore: Converts all call sites and test asserts to use apply_async and headers (#12591) 2026-04-20 11:40:04 -07:00
shamoon d2328b776a Performance: support bulk edit without id lists (#12355) 2026-03-31 18:23:28 +00:00
shamoon 0f84af27d0 Merge branch 'main' into dev
# Conflicts:
#	docs/setup.md
#	src-ui/src/main.ts
#	src/documents/tests/test_api_bulk_edit.py
#	src/documents/tests/test_api_custom_fields.py
#	src/documents/tests/test_api_search.py
#	src/documents/tests/test_api_status.py
#	src/documents/tests/test_workflows.py
#	src/paperless_mail/tests/test_api.py
2026-03-21 02:12:19 -07:00
shamoon f84e0097e5 Fix validate document link targets 2026-03-21 00:55:36 -07:00
shamoon 86573fc1a0 Chore: separate actions from bulk edit endpoint (#12286) 2026-03-10 18:55:36 +00:00
shamoon 731448a8f9 Fixhancement: support version-specific edits (#12233) 2026-03-06 11:59:26 -08:00
shamoon f65807b906 Merge branch 'main' into dev
# Conflicts:
#	docs/setup.md
#	src-ui/src/app/components/manage/document-attributes/management-list/management-list.component.ts
#	src/documents/tests/test_api_documents.py
2026-02-28 02:31:20 -08:00
shamoon c7f83212a3 Enforce on selection_data too 2026-02-28 01:27:40 -08:00
Sebastian Steinbeißer 3b5ffbf9fa Chore(mypy): Annotate None returns for typing improvements (#11213) 2026-02-02 08:44:12 -08:00
shamoon 5b1e66be91 Feature: password removal action (#11656) 2026-01-08 21:36:11 +00:00
dependabot[bot]andTrenton H 4ddac79f0f Chore(deps): Bump the small-changes group across 1 directory with 3 updates (#10880)
* Chore(deps): Bump the small-changes group across 1 directory with 3 updates

Bumps the small-changes group with 3 updates in the / directory: [ocrmypdf](https://github.com/ocrmypdf/OCRmyPDF), [mkdocs-material](https://github.com/squidfunk/mkdocs-material) and [ruff](https://github.com/astral-sh/ruff).


Updates `ocrmypdf` from 16.10.4 to 16.11.0
- [Release notes](https://github.com/ocrmypdf/OCRmyPDF/releases)
- [Changelog](https://github.com/ocrmypdf/OCRmyPDF/blob/main/docs/release_notes.md)
- [Commits](https://github.com/ocrmypdf/OCRmyPDF/compare/v16.10.4...v16.11.0)

Updates `mkdocs-material` from 9.6.19 to 9.6.20
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.19...9.6.20)

Updates `ruff` from 0.12.12 to 0.13.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.12.12...0.13.0)

---
updated-dependencies:
- dependency-name: ocrmypdf
  dependency-version: 16.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: small-changes
- dependency-name: mkdocs-material
  dependency-version: 9.6.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: small-changes
- dependency-name: ruff
  dependency-version: 0.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: small-changes
...

Signed-off-by: dependabot[bot] <support@github.com>

* Applies the new Ruff rule for unpacking

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
2025-09-17 13:16:34 -07:00
shamoon 6d72ee795f Feature: PDF editor (#10318) 2025-08-11 17:29:48 +00:00
shamoon fc68f55d1a Documentation: correct modify_tags param requirement 2025-02-14 08:20:43 -08:00
shamoon 9e4bc05a24 Fix: include global perms for bulk edit endpoint (#8468) 2024-12-12 15:38:54 +00:00
shamoon e4f69dc945 Feature: bulk edit custom field values (#8428) 2024-12-09 17:35:49 +00:00
shamoon dbccd13915 Enhancement: History (audit log) for bulk edit operations (#8196) 2024-12-01 17:53:52 +00:00
shamoon a64d457c30 Enhancement: use request user as owner of split / merge docs (#7112) 2024-06-27 13:46:49 -07:00
Dominik Bruhnandshamoon d1ac15baa9 Enhancement: support delete originals after split / merge (#6935)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-06-08 11:29:03 -07:00
shamoon 3e62f13f96 Enhancement: delete pages PDF action (#6772) 2024-05-22 23:01:15 +00:00
Trenton H 622f624132 Chore: Change the code formatter to Ruff (#6756)
* Changing the formatting to ruff-format

* Replaces references to black to ruff or ruff format, removes black from dependencies
2024-05-18 02:26:50 +00:00
Trenton H 7be7185418 Handcrafts SQL queries a little more to reduce the query count and/or the amount of returned data (#6489) 2024-04-30 07:37:09 -07:00
shamoon 63e1f9f5d3 Feature: custom fields filtering & bulk editing (#6484) 2024-04-26 15:10:03 -07:00
shamoon 4af8070450 Feature: PDF actions - merge, split & rotate (#6094) 2024-03-25 18:41:24 -07:00
shamoon ef4f589094 Change: dont require empty bulk edit parameters (#6059) 2024-03-09 07:39:35 -08:00
shamoon 454098630b Enhancement: mergeable bulk edit permissions (#5508) 2024-02-01 19:56:57 +00:00
shamoonandTrenton H e2d25a7a09 Chore: reorganize api tests (#4935)
* Move permissions-related API tests

* Move bulk-edit-related API tests

* Move bulk-download-related API tests

* Move uisettings-related API tests

* Move remoteversion-related API tests

* Move tasks API tests

* Move object-related API tests

* Move consumption-template-related API tests

* Rename pared-down documents API test file

Co-Authored-By: Trenton H <797416+stumpylog@users.noreply.github.com>
2023-12-12 04:08:51 +00:00