-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
🚮 feat: Enhance "Delete User" Script #7899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
danny-avila
merged 5 commits into
dev
from
7898-fix-delete-user-script-allow-deep-delete
Jun 15, 2025
Merged
🚮 feat: Enhance "Delete User" Script #7899
danny-avila
merged 5 commits into
dev
from
7898-fix-delete-user-script-allow-deep-delete
Jun 15, 2025
Conversation
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
1 task
…deep deletion of related data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the delete-user.js
script to fully remove a user and all their related data with interactive confirmations and cleaner shutdown.
- Expanded deletion scope across 20+ collections linked to a user.
- Added two-step confirmation prompts (full data and transaction history).
- Introduced
gracefulExit
for clean MongoDB disconnection and improved error handling.
Comments suppressed due to low confidence (1)
config/delete-user.js:38
- Add automated tests (unit or integration) for this main IIFE to verify both full and partial deletion flows, plus the
gracefulExit
behavior.
(async () => {
is a good idea Co-authored-by: Copilot <[email protected]>
danny-avila
approved these changes
Jun 15, 2025
jmaddington
pushed a commit
to jmaddington/LibreChat
that referenced
this pull request
Jun 21, 2025
* 🔧 fix: Enhance user deletion script to allow deep deletion of related data * 🔧 fix: Update user deletion script to confirm deep deletion of transaction history * 🔧 fix: Refactor user deletion script to use graceful exit and ensure deep deletion of related data * Update config/delete-user.js is a good idea Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
rhonyabdullah
pushed a commit
to rhonyabdullah/LibreChat
that referenced
this pull request
Jun 27, 2025
* 🔧 fix: Enhance user deletion script to allow deep deletion of related data * 🔧 fix: Update user deletion script to confirm deep deletion of transaction history * 🔧 fix: Refactor user deletion script to use graceful exit and ensure deep deletion of related data * Update config/delete-user.js is a good idea Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
kenshinsamue
pushed a commit
to intelequia/LibreChat
that referenced
this pull request
Aug 4, 2025
* 🔧 fix: Enhance user deletion script to allow deep deletion of related data * 🔧 fix: Update user deletion script to confirm deep deletion of transaction history * 🔧 fix: Refactor user deletion script to use graceful exit and ensure deep deletion of related data * Update config/delete-user.js is a good idea Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
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
This pull request significantly enhances the
delete-user.js
script to delete not only a user but also all associated data across multiple collections in the database. It introduces a more comprehensive deletion process, user confirmation prompts, and optional transaction history deletion.Enhancements to user deletion functionality:
Agent
,Assistant
,Balance
,Transaction
,ConversationTag
,Conversation
,Message
,File
,Key
,MemoryEntry
,PluginAuth
,Prompt
,PromptGroup
,Preset
,Session
,SharedLink
,ToolCall
, andToken
) when deleting a user.Code improvements:
process.argv[2]
or prompting the user if not provided.Change Type
Testing
Checklist