Implementation:Infiniflow Ragflow Admin ChangePasswordForm Component
| Knowledge Sources | |
|---|---|
| Domains | Frontend, Admin |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
Password change form component with Zod schema validation for enforcing password strength rules.
Description
The admin/forms/change-password-form.tsx component renders a password change dialog with current password, new password, and confirm password fields. It uses Zod schemas for client-side validation including minimum length, complexity requirements, and match confirmation. On submission it calls the admin API to update the user password.
Usage
Used within the user detail page and user management dialogs to reset or change a user's password.
Code Reference
Source Location
- Repository: Infiniflow_Ragflow
- File: web/src/pages/admin/forms/change-password-form.tsx
- Lines: 1-150
Signature
export default function ChangePasswordForm(): JSX.Element;
Import
import ChangePasswordForm from '@/pages/admin/forms/change-password-form';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| userId | string | Yes | Target user ID for password change |
| onSuccess | () => void | No | Callback invoked after successful password change |
Outputs
| Name | Type | Description |
|---|---|---|
| Rendered component | JSX.Element | Password change form with Zod validation |
Usage Examples
<ChangePasswordForm userId="user-123" onSuccess={() => setOpen(false)} />