LibreChat/api/server/controllers/__tests__
Marco Beretta 6e2941050b
🗑️ fix: Route Delete-User CLI Through the Shared Account Erasure Cascade (#17033)
* fix: Route Delete-User CLI Through the Shared Account Erasure Cascade

The operator CLI ran raw deleteMany calls that dropped File metadata while leaving storage objects, skipped skills, MCP servers and agent checkpoints, and used the wrong field for agent API keys. Account self-deletion and the CLI now share eraseUserData in packages/api, so both remove stored file objects before metadata, open checkpoint deletion around conversations, and clear skills, MCP servers and shared links with ACL cleanup.

* fix: Erase Favorites, Projects, Queued Turns and Refresh Bridges With the Account

Account erasure left tool favorites, chat projects, queued agent turns and their sequences, and OpenID refresh token bridges behind. The shared eraseUserData cascade now clears them, adding deleteUserToolFavorites and deleteUserChatProjects where no delete-by-user method existed.

* fix: Move MCP Server Erasure Queries Into Data Methods and Propagate Their Failures

* test: Cover Delete-User CLI and Self-Service Erasure Scenarios

* fix: Delete Stored Files When Account Deletion Arrives Without a Body

* fix: Delete Stored Files Before User Keys and Keep Provider Failures Best Effort

* fix: Propagate Agent and Prompt Erasure Failures Before Deleting the User

* fix: Delete Erasure Retry Anchors Last When Removing User-Owned Resources

* fix: Retire Session Hint From the Shared Erasure Cascade After Sessions Are Revoked

* fix: Propagate Skill and Agent Reference Cleanup Failures Before Deleting the User

* fix: Scope CLI Account Erasure to the Deleted User's Tenant and Legacy Refresh Bridges

* fix: Clean Shared-User MCP OAuth State When Account Erasure Removes a Server

* fix: Keep CLI Erasure System-Scoped Except ID-Keyed Cleanup and Await Shared-Link ACL Cleanup

* fix: Scope CLI MCP OAuth Lookups to the Tenant and Fail Erasure When Shared-User Cleanup Fails

* fix: Run CLI MCP OAuth Teardown and Allowlist Resolution Per User in the Tenant

* fix: Tear Down Shared-User MCP OAuth State Before Removing the Server Retry Anchors

* fix: Pin Agent Reference and MCP Token Cleanup to the Deleted User's Own Tenant
2026-10-14 23:53:16 +02:00
..
deleteUser.spec.js 🗑️ fix: Route Delete-User CLI Through the Shared Account Erasure Cascade (#17033) 2026-10-14 23:53:16 +02:00
deleteUserMcpServers.spec.js 🗑️ fix: Route Delete-User CLI Through the Shared Account Erasure Cascade (#17033) 2026-10-14 23:53:16 +02:00
deleteUserResourceCoverage.spec.js 🗑️ fix: Route Delete-User CLI Through the Shared Account Erasure Cascade (#17033) 2026-10-14 23:53:16 +02:00
maybeUninstallOAuthMCP.spec.js 🗑️ fix: Route Delete-User CLI Through the Shared Account Erasure Cascade (#17033) 2026-10-14 23:53:16 +02:00
mcp.servers.spec.js
PermissionsController.spec.js 🚥 fix: Preserve Insights With Guarded ACL Role Updates (#16170) 2026-09-21 23:40:52 -04:00
tools.callTool.contentFilter.spec.js ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
tools.verifyToolAuth.spec.js
TwoFactorController.spec.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
UserController.mcpOAuth.spec.js 📧 feat: add email address change (#14597) 2026-10-01 03:46:16 +00:00