Implementation:Infiniflow Ragflow Admin UserForm Component
| Knowledge Sources | |
|---|---|
| Domains | Frontend, Admin |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
User creation and editing form component with enterprise feature gating for advanced user management fields.
Description
The admin/forms/user-form.tsx component renders a comprehensive user form with fields for email, display name, role assignment, and account status. It includes enterprise feature gating that conditionally shows advanced fields (quota limits, team assignment, custom attributes) based on the deployment edition. Form validation uses Zod schemas.
Usage
Used within the users page as a dialog form for creating new user accounts or editing existing user profiles.
Code Reference
Source Location
- Repository: Infiniflow_Ragflow
- File: web/src/pages/admin/forms/user-form.tsx
- Lines: 1-223
Signature
export default function UserForm(): JSX.Element;
Import
import UserForm from '@/pages/admin/forms/user-form';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| user | undefined | No | Existing user data for edit mode; undefined for create mode |
| onSubmit | (user: User) => void | Yes | Callback with submitted user data |
Outputs
| Name | Type | Description |
|---|---|---|
| Rendered component | JSX.Element | User form with enterprise gating |
Usage Examples
<UserForm user={selectedUser} onSubmit={handleSaveUser} />