mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
useCan wraps useIsOrgAdmin which unconditionally called useOrganizations, so every gated page hit /organization/list even for capabilities that only look at the session role. That broke three page integration tests that assert fetch is not called for a non-admin, and it broke three cost-optimization tests where the extra useQuery threw because they rendered without a QueryClientProvider. Skip the fetch when the capability isn't in ORG_ADMIN_CAPABILITIES, and wrap the three cost-optimization test files with the shared providers helper so the still-necessary useQuery has a client. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||