From 5b1e66be918b203fa416e82da2cd94d1cb64bc21 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 8 Jan 2026 13:36:11 -0800 Subject: [PATCH] Feature: password removal action (#11656) --- docs/api.md | 7 + ...word-removal-confirm-dialog.component.html | 75 +++++++++ ...word-removal-confirm-dialog.component.scss | 0 ...d-removal-confirm-dialog.component.spec.ts | 53 +++++++ ...ssword-removal-confirm-dialog.component.ts | 38 +++++ .../document-detail.component.html | 6 + .../document-detail.component.spec.ts | 83 ++++++++++ .../document-detail.component.ts | 59 +++++++ src-ui/src/main.ts | 2 + src/documents/bulk_edit.py | 71 +++++++++ src/documents/serialisers.py | 11 ++ src/documents/tests/test_api_bulk_edit.py | 52 +++++++ src/documents/tests/test_bulk_edit.py | 145 ++++++++++++++++++ src/documents/views.py | 5 +- 14 files changed, 606 insertions(+), 1 deletion(-) create mode 100644 src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.html create mode 100644 src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.scss create mode 100644 src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.spec.ts create mode 100644 src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.ts diff --git a/docs/api.md b/docs/api.md index f7e12bf67..1ac634162 100644 --- a/docs/api.md +++ b/docs/api.md @@ -294,6 +294,13 @@ The following methods are supported: - `"delete_original": true` to delete the original documents after editing. - `"update_document": true` to update the existing document with the edited PDF. - `"include_metadata": true` to copy metadata from the original document to the edited document. +- `remove_password` + - Requires `parameters`: + - `"password": "PASSWORD_STRING"` The password to remove from the PDF documents. + - Optional `parameters`: + - `"update_document": true` to replace the existing document with the password-less PDF. + - `"delete_original": true` to delete the original document after editing. + - `"include_metadata": true` to copy metadata from the original document to the new password-less document. - `merge` - No additional `parameters` required. - The ordering of the merged document is determined by the list of IDs. diff --git a/src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.html b/src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.html new file mode 100644 index 000000000..fc866fe40 --- /dev/null +++ b/src-ui/src/app/components/common/confirm-dialog/password-removal-confirm-dialog/password-removal-confirm-dialog.component.html @@ -0,0 +1,75 @@ +