Implementation:FlowiseAI Flowise EditUserDialog
| Knowledge Sources | |
|---|---|
| Domains | User Management, UI Dialogs |
| Last Updated | 2026-02-12 07:00 GMT |
Overview
EditUserDialog is a React dialog component that allows organization administrators to view user details and update a user's account status (active/inactive) within the organization.
Description
This component renders a Material UI Dialog through a React portal. It displays the user's email (read-only), name (read-only), and an editable account status dropdown with "Active" and "Inactive" options. The status dropdown is disabled when the target user is the organization owner, with an explanatory message. On save, it calls the userApi.updateOrganizationUser endpoint with the user ID, organization ID, and new status. Redux dispatch is used for canvas dialog state management (SHOW_CANVAS_DIALOG/HIDE_CANVAS_DIALOG) and snackbar notifications for success and error feedback.
Usage
Use this component within the user management section to edit organization user details. It is typically opened when an administrator selects a user to edit from the users list. Note: the file comment indicates it is temporarily not used until role changing is allowed.
Code Reference
Source Location
- Repository: FlowiseAI Flowise
- File: packages/ui/src/views/users/EditUserDialog.jsx
- Lines: 1-218
Signature
const EditUserDialog = ({ show, dialogProps, onCancel, onConfirm, setError }) => { ... }
Import
import EditUserDialog from '@/views/users/EditUserDialog'
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| show | bool | Yes | Controls whether the dialog is visible |
| dialogProps | object | Yes | Contains type ('EDIT'), data (with user object and isOrgOwner flag), and confirmButtonName |
| onCancel | func | Yes | Callback invoked when the dialog is cancelled or an error occurs |
| onConfirm | func | Yes | Callback invoked with the updated user id on successful save |
| setError | func | Yes | Callback to propagate errors to the parent component |
Outputs
| Name | Type | Description |
|---|---|---|
| React Portal | JSX.Element | Renders the dialog via createPortal to the element with id "portal" |
Usage Examples
Basic Usage
<EditUserDialog
show={showEditDialog}
dialogProps={{
type: 'EDIT',
data: {
user: { id: 'user_123', email: 'user@example.com', name: 'John Doe', status: 'active' },
isOrgOwner: false
},
confirmButtonName: 'Save'
}}
onCancel={() => setShowEditDialog(false)}
onConfirm={(userId) => {
refreshUserList()
setShowEditDialog(false)
}}
setError={setError}
/>