mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
useCan started calling useIsOrgAdmin unconditionally in PR #36478 so it could opt viewDeletedTeams open for organization admins, but useIsOrgAdmin drives a useOrganizations query, so every role-gated page now fires GET /organization/list just to compute a denial. The Memory, Workflows and Guardrails Monitor page tests catch this: they set up a non-admin session, expect the admin-only notice, and assert fetch was never called; instead the organization list is requested and the assertion fails 12 times. Track which capabilities actually opt org admins in (only viewDeletedTeams today) via capabilityRequiresOrgAdmin, thread an enabled flag from useCan through useIsOrgAdmin into useOrganizations, and treat the org-admin membership lookup as false while disabled so hasCapability sees no false positive. The existing role gates for viewMemory, viewWorkflowRuns, viewGuardrailUsage, viewProxyWideCostData never look at isOrgAdmin, so this is a pure fetch skip. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||