mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix allow internal user and internal viewer to view usage
This commit is contained in:
parent
e338cf2300
commit
2b91a79c7a
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@ interface SidebarProps {
|
|||
defaultSelectedKey: string[] | null;
|
||||
}
|
||||
|
||||
const rolesAllowedToSeeUsage = ["Admin", "Admin Viewer", "Internal User", "Internal Viewer"];
|
||||
|
||||
const Sidebar: React.FC<SidebarProps> = ({
|
||||
setPage,
|
||||
userRole,
|
||||
|
@ -62,7 +64,7 @@ const Sidebar: React.FC<SidebarProps> = ({
|
|||
<Text>Models</Text>
|
||||
</Menu.Item>
|
||||
) : null}
|
||||
{userRole == "Admin" ? (
|
||||
{rolesAllowedToSeeUsage.includes(userRole) ? (
|
||||
<Menu.Item key="4" onClick={() => setPage("usage")}>
|
||||
<Text>Usage</Text>
|
||||
</Menu.Item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue