From e54f7cfd02c8338d934cc35cef76cdafd438e22e Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:27:55 -0700 Subject: [PATCH] Cleans up the comment about why this is still here for now --- src/documents/permissions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/documents/permissions.py b/src/documents/permissions.py index b545c274b..82b5d9fe8 100644 --- a/src/documents/permissions.py +++ b/src/documents/permissions.py @@ -361,7 +361,7 @@ def get_objects_for_user_owner_aware( When include_deleted is True, soft-deleted items are also included. Legacy slow path (guardian-backed, O(n) style permission resolution). - The Stage 4 unification migrated most call sites onto + Most queryset-filtering call sites have migrated onto ``PermittedObjectsFilter``/``permitted_object_ids()``, but this function is kept because production callers still remain. Several callers remain across ``documents/``, ``paperless_mail/``, and ``paperless_ai/`` -- @@ -388,11 +388,11 @@ def has_perms_owner_aware(user, perms, obj): """ Legacy slow path (guardian-backed) single-object permission check. - Stage 4's ``PermittedObjectsFilter``/``permitted_object_ids()`` covers - queryset-level filtering, but this single-object check still has many - production callers. Several callers remain across ``documents/``, - ``paperless_mail/``, and ``paperless_ai/`` -- grep for this function - name before removing it. + The queryset-filtering side of this migrated onto + ``PermittedObjectsFilter``/``permitted_object_ids()``, but this + single-object check still has many production callers. Several callers + remain across ``documents/``, ``paperless_mail/``, and ``paperless_ai/`` + -- grep for this function name before removing it. """ checker = ObjectPermissionChecker(user) return obj.owner is None or obj.owner == user or checker.has_perm(perms, obj)