Cleans up the comment about why this is still here for now

This commit is contained in:
stumpylog
2026-08-07 13:16:04 -07:00
committed by Trenton H
parent 48812756fc
commit e54f7cfd02
+6 -6
View File
@@ -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)