Fix: limit manually run OCR templates to those the requester can view

A user editing someone else's document could run the owner's private
templates and see their names. Manual runs now use templates both can view.
This commit is contained in:
stumpylog committed 2026-11-18 07:55:52 -08:00
1 parent 0c90c57e3e
commit 4788ac602b
10 files changed
+170 -27

No files matched your search

+1 -1
View File
@@ -2336,7 +2336,7 @@ class DocumentViewSet(
templates = (
[template]
if template is not None
else get_templates_for_document(file_document)
else get_templates_for_document(file_document, requester=request.user)
)
if not templates:
return Response(