mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-21 04:52:40 +00:00
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:
1 parent
0c90c57e3e
commit
4788ac602b
10 files changed
+170
-27
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user