mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix: default invite user modal global role to least-privilege
Pre-select "Internal User Viewer" in the Global Proxy Role dropdown on both the standalone and embedded Invite User forms so admins don't have to remember to pick a role, and the default lands on the least privileged option rather than silently posting an undefined role.
This commit is contained in:
parent
e64d98f725
commit
a428ae7599
1 changed files with 16 additions and 2 deletions
|
|
@ -175,7 +175,14 @@ export const CreateUserButton: React.FC<CreateuserProps> = ({
|
|||
// Modify the return statement to handle embedded mode
|
||||
if (isEmbedded) {
|
||||
return (
|
||||
<Form form={form} onFinish={handleCreate} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} labelAlign="left">
|
||||
<Form
|
||||
form={form}
|
||||
onFinish={handleCreate}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
labelAlign="left"
|
||||
initialValues={{ user_role: "internal_user_viewer" }}
|
||||
>
|
||||
<Alert
|
||||
message="Email invitations"
|
||||
description={
|
||||
|
|
@ -257,7 +264,14 @@ export const CreateUserButton: React.FC<CreateuserProps> = ({
|
|||
className="mb-4"
|
||||
/>
|
||||
</Space>
|
||||
<Form form={form} onFinish={handleCreate} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} labelAlign="left">
|
||||
<Form
|
||||
form={form}
|
||||
onFinish={handleCreate}
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
labelAlign="left"
|
||||
initialValues={{ user_role: "internal_user_viewer" }}
|
||||
>
|
||||
<Form.Item label="User Email" name="user_email">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue