unbridled-41 opened a new issue, #4252: URL: https://github.com/apache/rocketmq-dashboard/issues/4252
## Problem The create-user dialog on the Studio user management page (`web/src/pages/studio/UserManagement.tsx`) keeps its form mounted across open/close cycles. The cancel path (`onCancel`, line ~513) only closes the dialog: there is no `resetFields()` and no `destroyOnHidden`. The form is only reset on the create-success path (`createUser`, lines ~179-180) and in the reset-password dialog of the same file. ## Evidence 1. Open the create dialog, type a username, an initial password and enable the admin switch. 2. Cancel (or press Esc / click the mask). 3. Reopen the dialog: the username, the initial password and the admin switch are still filled. 4. Change only the username and submit: `createStudioUser` is called with the previous attempt's initial password and `admin: true` from the cancelled attempt. A regression test demonstrating the residue on the unfixed code lives in the linked PR. ## Impact An operator who cancels an attempt and later creates a different user can unknowingly create an admin account and reuse a password they believed was discarded. The created account is elevated and its credential is not the one the operator chose for it. ## Expected behavior Dismissing the dialog without creating resets the form to its initial values, so the next attempt starts from a clean username, password and admin switch. ## Related work The same page's reset-password dialog already resets on cancel, and the create-success path resets the form; sibling create dialogs reset on cancel (`cluster/index.tsx` NameServer create, `instance/index.tsx` create/edit). Issue #4251 records the same residue class for the maintenance-window dialog on the system alerts page. ## PR Fix incoming. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
