Steuere das Herunterladen von Originalen je Rolle, benenne Dateien richtig und zeige HTML-Mails gesichert im Sandbox-Rahmen.
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 5m35s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 22s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
StommerandClaude Sonnet 5.5 committed 2026-10-22 14:22:35 +02:00
1 parent 0a5daf6713
commit 075525ee17
26 files changed
+494 -71

No files matched your search

+8 -2
View File
@@ -8,10 +8,10 @@ from uuid import UUID
from fastapi import APIRouter, Depends, Request, Response
from psycopg import Connection
from app.access.policy import Ctx, parse_query_context
from app.access.policy import Ctx, get_matter, matter_rights, parse_query_context
from app.api.deps import Principal, get_conn, get_principal
from app.api.schemas import ExportIn
from app.core.errors import unprocessable
from app.core.errors import DOWNLOAD_REFUSED, forbidden, unprocessable
from app.exporting import build_export, export_tree, review_export
router = APIRouter()
@@ -79,6 +79,12 @@ def post_export(
conn: Connection = Depends(get_conn),
):
selected, assignments = _selection(body)
matter = get_matter(conn, matter_id)
if matter is not None:
rights = matter_rights(conn, principal.account_id, matter, _context(body.context))
# Without any right the export itself answers as before. With read but no download right: refuse.
if rights.read and not rights.download:
raise forbidden(DOWNLOAD_REFUSED)
filename, payload = build_export(
conn,
principal.account_id,