feat(users): add ability to merge users #2292
Draft
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.
Description
Warning
Claude code was used extensively for this change to both investigate the codebase and write the code to make the desired feature.
Adds a new user merge feature that allows admins to consolidate duplicate user accounts. When merging, all data from the source user is transferred to the target user including:
The source user is deleted after the merge. Includes safeguards to prevent merging the owner account or admin users without owner permission. I needed to use this feature locally after somehow ending up with duplicate users imported from jellyfin.
How Has This Been Tested?
I initially tested with my own home seerr setup and ensured that I was able to merge my duplicate users without breaking anything. my duplicate users had requests associated with them at the time and I ensured that those requests were successfully moved over to the target users. I did not manually test issues/watchlist/override rule related changes manually though.
test coverage is currently WIP
Screenshots / Logs (if applicable)
The merge functionality is added in a new "Danger Zone" section at the bottom of user settings:


Clicking the button pops open this modal to select the user to merge into:
Checklist:
pnpm buildpnpm i18n:extract