Commit Graph
1 Commits
Author SHA1 Message Date
Jake Jackson 85c334e3a4 AAP-96178: Fix unified_jobs pagination count to respect RBAC filtering (#16751)
* AAP-96178: Fix unified_jobs pagination count to respect RBAC filtering

Non-admin users saw the unfiltered table-wide count instead of the count
matching their RBAC-visible results. Use the same primary-key subquery
approach already proven on the /api/v2/jobs/ endpoint.


* AAP-96178: Add docstrings and mixed-role count test for UnifiedJobPaginator

Clarify the PK subquery approach with expanded docstring and inline
comments per review feedback. Add a functional test verifying that a user
with a mix of JT and inventory roles sees a count matching exactly
their permitted results.


* AAP-96178: Add deduplication test for multiple RBAC access routes

Verify that a job reachable through three overlapping permission paths
(direct JT role, org audit role, and team JT role) appears exactly once
in both results and count.

Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-10-22 09:34:30 -04:00