mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
The recent capability-gating pass added useCan calls to UsageTab.tsx, CostOptimizationView.tsx, and the three new admin-only page.tsx files. useCan reaches useIsOrgAdmin -> useOrganizations -> useQuery, so every render now needs a QueryClientProvider or the tree throws "No QueryClient set" and the /organization/list fetch is a legitimate side effect. Mock useCan in the three unit tests, wired to the real hasCapability so per-role behaviour still runs end-to-end. Narrow the three page integration tests' loose "fetchMock was never called" assertion to the specific admin-only endpoint each page owns; the org fetch was tripping it after the capability check landed. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||