✨ Add admin UI for restoring deleted users#1248
Merged
0x46616c6b merged 1 commit intomainfrom Apr 18, 2026
Merged
Conversation
Adds a restore action to the admin user management that allows admins to restore soft-deleted users with a new password. The restore flow regenerates mailbox encryption, recovery token, and sends a welcome email via a new USER_RESTORED event. - Add restore/restoreSubmit actions to UserController (GET/POST split) - Add UserRestoreType form with password validation - Add restore.html.twig template with warning banner and password strength - Show restore button on user index and show pages for deleted users - Display recovery token prominently on show page after restore - Add USER_RESTORED event constant and dispatch from UserRestoreService - Subscribe WelcomeMailListener to USER_RESTORED - Add EN/DE translations with admin-context recovery token wording - Add 7 Behat scenarios covering restore flow and authorization - Update unit tests for event and listener changes Co-Authored-By: OpenCode <noreply@opencode.ai>
2c52911 to
99ca576
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds a restore action to the admin user management, allowing admins to restore soft-deleted users directly from the admin interface. Previously, restoring users was only possible via the CLI command
app:users:restore.The restore flow sets a new password, resets two-factor authentication and mailbox encryption, generates a new recovery token, and sends a welcome email. The recovery token is displayed prominently on the user show page after a successful restore, with clear instructions to pass it on to the user.
Key changes
restore(GET) andrestoreSubmit(POST) actions onUserControllerfollowing the GET/POST split patternUserRestoreTypewith repeated password field (min 12 chars, NotCompromised)USER_RESTOREDevent constant, dispatched byUserRestoreServiceinstead of reusingUSER_CREATEDWelcomeMailListenernow also subscribes toUSER_RESTOREDThe changes and the PR were generated by OpenCode.