mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
ui: rename key type Default to Full Access
Co-authored-by: Shivam Rawat <shivamrawat1@users.noreply.github.com>
This commit is contained in:
parent
6549b4583f
commit
3616c97100
4 changed files with 23 additions and 4 deletions
|
|
@ -287,6 +287,19 @@ describe("CreateKey", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("should display 'Full Access' label for the default key type option", async () => {
|
||||
renderWithProviders(<CreateKey {...defaultProps} />);
|
||||
|
||||
act(() => {
|
||||
fireEvent.click(screen.getByRole("button", { name: /create new key/i }));
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText("Full Access")).toBeInTheDocument();
|
||||
expect(screen.queryByText(/^Default$/)).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
it("should include access_group_ids in keyCreateCall payload when access groups are selected", async () => {
|
||||
renderWithProviders(<CreateKey {...defaultProps} />);
|
||||
|
||||
|
|
|
|||
|
|
@ -924,9 +924,9 @@ const CreateKey: React.FC<CreateKeyProps> = ({ team, teams, data, addKey, autoOp
|
|||
}
|
||||
}}
|
||||
>
|
||||
<Option value="default" label="Default">
|
||||
<Option value="default" label="Full Access">
|
||||
<div style={{ padding: "4px 0" }}>
|
||||
<div style={{ fontWeight: 500 }}>Default</div>
|
||||
<div style={{ fontWeight: 500 }}>Full Access</div>
|
||||
<div style={{ fontSize: "11px", color: "#6b7280", marginTop: "2px" }}>
|
||||
Can call AI APIs + Management routes
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -528,6 +528,12 @@ describe("KeyEditView", () => {
|
|||
const hasAIAPIs = optionTexts.some((text) => text?.includes("AI APIs"));
|
||||
expect(hasAIAPIs).toBe(true);
|
||||
|
||||
const hasFullAccess = optionTexts.some((text) => text?.includes("Full Access"));
|
||||
expect(hasFullAccess).toBe(true);
|
||||
|
||||
const hasDefault = optionTexts.some((text) => text?.includes("Default"));
|
||||
expect(hasDefault).toBe(false);
|
||||
|
||||
// Verify old "LLM API" label does NOT appear
|
||||
const hasLLMAPI = optionTexts.some((text) => text?.includes("LLM API"));
|
||||
expect(hasLLMAPI).toBe(false);
|
||||
|
|
|
|||
|
|
@ -361,9 +361,9 @@ export function KeyEditView({
|
|||
}
|
||||
}}
|
||||
>
|
||||
<Select.Option value="default" label="Default">
|
||||
<Select.Option value="default" label="Full Access">
|
||||
<div style={{ padding: "4px 0" }}>
|
||||
<div style={{ fontWeight: 500 }}>Default</div>
|
||||
<div style={{ fontWeight: 500 }}>Full Access</div>
|
||||
<div style={{ fontSize: "11px", color: "#6b7280", marginTop: "2px" }}>
|
||||
Can call AI APIs + Management routes
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue