[Fix] UI - Allow Proxy Admin Viewer to access /api-keys page

The /api-keys page was hard-blocking proxy_admin_viewer at the user_dashboard entry point with an "Access Denied" screen, contradicting the role's own description ("view all keys, view all spend") in litellm/proxy/_types.py and the backend route_checks/admin_viewer_routes/key handler that already allow /key/list and /key/info for this role. Component-level guards (rolesWithWriteAccess in ui/litellm-dashboard/src/utils/roles.ts) already hide the Create / Edit / Delete affordances for this role, so removing the entry-level gate makes the UI consistent with the backend and with sibling viewer-open features (Audit Logs #23419, Spend Logs #26583).
This commit is contained in:
kimsehwan96 2026-04-28 20:19:32 +09:00
parent 62920a0cb2
commit 56cba1729c

View file

@ -317,16 +317,6 @@ const UserDashboard: React.FC<UserDashboardProps> = ({
setUserRole("App Owner");
}
if (userRole && userRole == "Admin Viewer") {
const { Title, Paragraph } = Typography;
return (
<div>
<Title level={1}>Access Denied</Title>
<Paragraph>Ask your proxy admin for access to create keys</Paragraph>
</div>
);
}
console.log("inside user dashboard, selected team", selectedTeam);
console.log("All cookies after redirect:", document.cookie);
return (