diff --git a/ui/litellm-dashboard/src/components/create_key_button.tsx b/ui/litellm-dashboard/src/components/create_key_button.tsx index c06ef8e9e..391e535d5 100644 --- a/ui/litellm-dashboard/src/components/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/create_key_button.tsx @@ -11,6 +11,7 @@ const { Option } = Select; interface CreateKeyProps { userID: string; + userRole: string; accessToken: string; data: any[] | null; setData: React.Dispatch>; @@ -18,6 +19,7 @@ interface CreateKeyProps { const CreateKey: React.FC = ({ userID, + userRole, accessToken, data, setData, @@ -80,45 +82,56 @@ const CreateKey: React.FC = ({ name="key_alias" > - + + + + - - - - + + + - - - - - - - - - - - - -
- - Create Key - -
+ {userRole === 'App Owner' || userRole === 'Admin' ? ( + <> + + + + + + + + + + + + + + + + ) : null} +
+ + Create Key + +
{apiKey && ( diff --git a/ui/litellm-dashboard/src/components/user_dashboard.tsx b/ui/litellm-dashboard/src/components/user_dashboard.tsx index 560c30b6d..f8054751e 100644 --- a/ui/litellm-dashboard/src/components/user_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/user_dashboard.tsx @@ -31,6 +31,8 @@ const UserDashboard = () => { switch (userRole.toLowerCase()) { case "app_owner": return "App Owner"; + case "demo_app_owner": + return "AppOwner"; case "admin": return "Admin"; case "app_user": @@ -104,12 +106,14 @@ const UserDashboard = () => {