[PR #846] [MERGED] feat: account deletion #1204

Closed
opened 2026-02-26 19:32:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/846
Author: @ephraimduncan
Created: 1/21/2024
Status: Merged
Merged: 2/25/2024
Merged by: @Mythie

Base: mainHead: feat/account-deletion


📝 Commits (10+)

  • f652ca9 feat: account deletion confirmation dialog
  • a3e5608 feat: delete user from db and unsubscribe from stripe
  • 7762b1d feat: add loading to button
  • 9e433af feat: require 2fa code before account is deleted
  • 014c09b fix: account deletion error for users without two factor authentication
  • 4d93ed6 feat: add deleted account migration
  • 4c09867 feat: transfer completed and pending documents to deleted email
  • bc98907 Merge branch 'main' into feat/account-deletion
  • 3075281 feat: soft-delete transfered documents
  • 6daaa3a Merge branch 'main' into feat/account-deletion

📊 Changes

12 files changed (+238 additions, -9 deletions)

View changed files

📝 .devcontainer/devcontainer.json (+9 -3)
apps/web/src/app/(dashboard)/settings/profile/delete-account-dialog.tsx (+124 -0)
📝 apps/web/src/app/(dashboard)/settings/profile/page.tsx (+5 -1)
📝 apps/web/src/components/forms/profile.tsx (+9 -1)
📝 packages/lib/server-only/2fa/validate-2fa.ts (+1 -1)
📝 packages/lib/server-only/2fa/verify-2fa-token.ts (+1 -1)
📝 packages/lib/server-only/user/delete-user.ts (+19 -0)
packages/lib/server-only/user/service-accounts/deleted-account.ts (+17 -0)
packages/prisma/migrations/20240205120648_create_delete_account/migration.sql (+30 -0)
📝 packages/trpc/react/index.tsx (+1 -1)
📝 packages/trpc/server/profile-router/router.ts (+20 -0)
📝 packages/ui/primitives/button.tsx (+2 -1)

📄 Description

Summary by CodeRabbit

  • New Features
    • Added two-factor authentication form handling in profile settings.
    • Introduced account deletion functionality, including Stripe customer data removal.
    • Updated UI components and styles for improved user interaction, such as enhanced visual feedback for destructive actions.
  • Refactor
    • Improved code quality by updating import statements for type-only imports.
  • Chores
    • Restructured the forwardPorts array in dev container configuration for clarity.
    • Removed a trailing comma in the vscode extensions list to adhere to JSON format rules.
  • Documentation
    • Added comments to clarify the handling of undefined values in two-factor authentication verification.
  • Database
    • Implemented a SQL migration script for creating a default deleted user in the system.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/846 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 1/21/2024 **Status:** ✅ Merged **Merged:** 2/25/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/account-deletion` --- ### 📝 Commits (10+) - [`f652ca9`](https://github.com/documenso/documenso/commit/f652ca9b73b5eddd38d0f7828602f2430bbdb2c4) feat: account deletion confirmation dialog - [`a3e5608`](https://github.com/documenso/documenso/commit/a3e560899a82521c1edbfa75e0d259f3f12d9ac1) feat: delete user from db and unsubscribe from stripe - [`7762b1d`](https://github.com/documenso/documenso/commit/7762b1db6593e80af92bc854989828f53d2545a6) feat: add loading to button - [`9e433af`](https://github.com/documenso/documenso/commit/9e433af1126c2d0f7665d0cb827cd16ffe9fff91) feat: require 2fa code before account is deleted - [`014c09b`](https://github.com/documenso/documenso/commit/014c09bd910a407f974dff880e1c35e10e02ece8) fix: account deletion error for users without two factor authentication - [`4d93ed6`](https://github.com/documenso/documenso/commit/4d93ed60c5fb32d8fc364582292f750259f1cc66) feat: add deleted account migration - [`4c09867`](https://github.com/documenso/documenso/commit/4c09867b551817ca808824922d5b6943774bbd4d) feat: transfer completed and pending documents to deleted email - [`bc98907`](https://github.com/documenso/documenso/commit/bc989075bae705bd5d4feda2fbc574230258ca03) Merge branch 'main' into feat/account-deletion - [`3075281`](https://github.com/documenso/documenso/commit/30752815e77138c269ccc8f901575268e2df4f86) feat: soft-delete transfered documents - [`6daaa3a`](https://github.com/documenso/documenso/commit/6daaa3a6d412980d4502e9416ef95179463d2ef1) Merge branch 'main' into feat/account-deletion ### 📊 Changes **12 files changed** (+238 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `.devcontainer/devcontainer.json` (+9 -3) ➕ `apps/web/src/app/(dashboard)/settings/profile/delete-account-dialog.tsx` (+124 -0) 📝 `apps/web/src/app/(dashboard)/settings/profile/page.tsx` (+5 -1) 📝 `apps/web/src/components/forms/profile.tsx` (+9 -1) 📝 `packages/lib/server-only/2fa/validate-2fa.ts` (+1 -1) 📝 `packages/lib/server-only/2fa/verify-2fa-token.ts` (+1 -1) 📝 `packages/lib/server-only/user/delete-user.ts` (+19 -0) ➕ `packages/lib/server-only/user/service-accounts/deleted-account.ts` (+17 -0) ➕ `packages/prisma/migrations/20240205120648_create_delete_account/migration.sql` (+30 -0) 📝 `packages/trpc/react/index.tsx` (+1 -1) 📝 `packages/trpc/server/profile-router/router.ts` (+20 -0) 📝 `packages/ui/primitives/button.tsx` (+2 -1) </details> ### 📄 Description <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added two-factor authentication form handling in profile settings. - Introduced account deletion functionality, including Stripe customer data removal. - Updated UI components and styles for improved user interaction, such as enhanced visual feedback for destructive actions. - **Refactor** - Improved code quality by updating import statements for type-only imports. - **Chores** - Restructured the `forwardPorts` array in dev container configuration for clarity. - Removed a trailing comma in the `vscode` extensions list to adhere to JSON format rules. - **Documentation** - Added comments to clarify the handling of undefined values in two-factor authentication verification. - **Database** - Implemented a SQL migration script for creating a default deleted user in the system. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:32:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1204
No description provided.