mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-30 23:55:59 +00:00
The owner-aware "resolve user to visible document pks" block was duplicated verbatim between get_context_for_document and get_taxonomy_hints_for_document. Extract it into indexing.visible_document_ids_for_user, next to its sibling normalize_document_ids, and call it from both paths. No behavior change: the helper returns None when user is None (unfiltered retrieval) and the same pk list otherwise. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>