feat(P-11): Implement Legal Hold functionality for media assets
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 10s
Test Suite / playwright-tests (push) Successful in 54s

- Added backend support for Legal Hold with new endpoints to set and release holds on media assets.
- Introduced new database columns for managing Legal Hold status and reasons.
- Updated frontend to include UI elements for setting and releasing Legal Holds, including a confirmation dialog.
- Enhanced Media Library page to display Legal Hold status and actions for superadmins.
- Implemented comprehensive backend tests covering all aspects of Legal Hold functionality.
- Updated documentation to reflect changes in the upload rights specification and interface models.
- Bumped version to 0.8.84 and updated MediaLibraryPage version to 1.6.0.
This commit is contained in:
Lars committed 2026-05-11 12:33:13 +02:00
1 parent 1640fe6045
commit 1ce6d929ce
16 files changed
+1180 -42

No files matched your search

+5 -5
View File
@@ -3,7 +3,7 @@
**Typ:** Kanonisches Referenzdokument
**Erstellt:** 2026-05-10
**Basisdokument:** `docs/compliance-audit.md` (Initial-Audit 2026-05-09, App-Version 0.8.65)
**Letzte Aktualisierung:** 2026-05-11 (App-Version 0.8.83)
**Letzte Aktualisierung:** 2026-05-11 (App-Version 0.8.84)
---
@@ -195,10 +195,10 @@
| **Kanonischer Titel** | Legal-Hold Lifecycle-Status (Sofortsperrung bei Rechtsverletzung) |
| **Findings** | MITT-02 |
| **Etappe** | 2 |
| **Status** | ❌ open |
| **Letzter Stand** | Nicht umgesetzt. Stufe-1-Papierkorb dauert 30 Tage bis zur vollständigen Unsichtbarkeit. Kein direkter Sperr-Status. |
| **Verweise** | `docs/compliance-audit.md` §9.2, §16 (MITT-02), §17 |
| **Hinweise** | **Drift-Hinweis:** In `docs/compliance-implementation.md` (vor Korrektur 2026-05-10) wurde P-11 fälschlich als „HttpOnly-Cookie-Migration" beschrieben. Der korrekte Titel ist „Legal-Hold Lifecycle-Status". HttpOnly-Cookie gehört zu P-18. Korrigiert in `docs/compliance-implementation.md`. |
| **Status** | ✅ implemented |
| **Letzter Stand** | Vollständig umgesetzt in Version 0.8.84 (2026-05-11). Migration 051: neue Felder `legal_hold_active`, `legal_hold_reason_code`, `legal_hold_reason_note`, `legal_hold_set_by_profile_id`, `legal_hold_set_at`, `legal_hold_released_by_profile_id`, `legal_hold_released_at`, `legal_hold_release_note` in `media_assets`; Audit-Log-Ereignistypen `legal_hold_set`/`legal_hold_released`. Zentrales Service-Modul `media_legal_hold.py`. Retention-Job überspringt Legal-Hold-Assets. Nur Superadmin darf setzen/aufheben; Admins sehen Legal-Hold-Assets in Listen; normale Nutzer nicht. Frontend: Badge „Sofort gesperrt", Superadmin-Aktionen mit Pflichtfeldern und Bestätigungsdialog, Journal-Renderpfad. |
| **Verweise** | `docs/compliance-audit.md` §9.2, §16 (MITT-02), §17; `docs/compliance-implementation.md` §P-11; `backend/media_legal_hold.py`; `backend/routers/media_assets.py` (admin_legal_hold_router); `backend/migrations/051_legal_hold.sql`; `backend/tests/test_p11_legal_hold.py` |
| **Hinweise** | Orthogonal zum normalen Papierkorb-Lifecycle (P-03). `rights_status='blocked'` wird als Schnell-Spiegel gesetzt und bei Aufhebung basierend auf vorhandenen Deklarationen wiederhergestellt. Scope abgegrenzt: P-13 (Meldeverfahren), P-14 (DSA-Transparenz), P-15 (DSA-Moderationslog), P-16 (DSA-Beschwerdeweg) bleiben eigene Pakete. |
---