Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

refactor(ui): name the admin checks behind the team-admin edit branch

ryan-crabbe-berriaf0312ba8f41
diff --git a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx
index af94b26ed51..e84e1db5ca4 100644
--- a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx
+++ b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx
@@ -632,8 +632,9 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({
);
const canEditTeam = is_team_admin || is_proxy_admin || is_org_admin || isOrgAdminForTeam || isTeamAdminFromTeamData;
- const editsAsTeamAdmin =
- canEditTeam && !is_proxy_admin && !isProxyAdminRole(userRole) && !is_org_admin && !isOrgAdminForTeam;
+ const viewerIsProxyAdmin = is_proxy_admin || isProxyAdminRole(userRole);
+ const viewerIsOrgAdmin = is_org_admin || isOrgAdminForTeam;
+ const editsAsTeamAdmin = canEditTeam && !viewerIsProxyAdmin && !viewerIsOrgAdmin;
const teamEditAccess = useMemo(
() => resolveTeamEditAccess(editsAsTeamAdmin, uiSettingsData?.values),
[editsAsTeamAdmin, uiSettingsData],