API: allow reads to filter by client_id on top of RBAC client scoping

The RBAC rework dropped the client_id read filter along with per-key client scope, so an all-clients key could no longer narrow to one client. apiClientScopeSql() now appends the filter after the scope fragment, so it can only narrow, never widen. Reads only - writes take client_id as their target client.
This commit is contained in:
johnnyq
2026-08-31 18:30:09 -04:00
parent b0c12ac89d
commit 36ea4a9a80
4 changed files with 43 additions and 13 deletions

View File

@@ -9,6 +9,7 @@
* year (optional) - Filter by year (default: current year)
* month (optional) - Filter by month 1-12 (default: current month)
* technician_id (optional) - Filter by specific technician user ID
* client_id (optional) - Only count time on tickets for this client
* limit (optional) - Number of results to return (default: 50)
* offset (optional) - Offset for pagination (default: 0)
*/