kevin-asprec 430c8ee7f8 test(05-04): add comprehensive API RBAC integration tests
- 43 tests covering authentication (401), authorization (403), and tenant isolation
- withPermission HOF returns 401 for unauthenticated, 403 for unauthorized
- withPortalAuth returns 401/403 for non-portal users
- All 5 roles (ADMIN, OFFICE_STAFF, COLLECTOR, TECHNICIAN, CLIENT) tested against all subjects
- COLLECTOR cannot access billing/reports/subscriber management writes
- TECHNICIAN cannot access payment/invoice/report endpoints
- CLIENT can only read own data, create tickets
- Two-tenant isolation: subscribers, invoices, payments invisible across tenants
- Cross-tenant ID lookup returns null (no data leakage)
- INFRA-03 satisfied

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:44:19 +08:00
Description
No description provided
819 KiB
Languages
TypeScript 96.6%
Shell 3.3%