mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
Six tests that render components calling useCan started failing after PR #36475 added the capability check. useCan pulls in useIsOrgAdmin, which calls useOrganizations, which calls useQuery -- so the tests either crashed with 'No QueryClient set' (unit tests without a provider) or fired an unexpected /organization/list fetch that broke role-gated 'fetch not called' assertions (integration tests). Mock useCan directly to run hasCapability against the already-mocked useAuthorized userRole. Session-role-driven capabilities work as before; tests that need viewDeletedTeams-style isOrgAdmin behavior already mock useCan at file scope and are unaffected. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||