feat: Implement account deletion (mark for removal) feature
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 23s
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 23s
- Added `marked_for_deletion` and `marked_for_deletion_at` fields to User model (Python and TypeScript) with serialization updates - Created POST /api/user/mark-for-deletion endpoint with JWT auth, error handling, and SSE event trigger - Blocked login and password reset for marked users; added new error codes ACCOUNT_MARKED_FOR_DELETION and ALREADY_MARKED - Updated UserProfile.vue with "Delete My Account" button, confirmation modal (email input), loading state, success/error modals, and sign-out/redirect logic - Synced error codes and model fields between backend and frontend - Added and updated backend and frontend tests to cover all flows and edge cases - All Acceptance Criteria from the spec are complete and verified
This commit is contained in:
@@ -107,8 +107,8 @@
|
||||
An account with <strong>{{ email }}</strong> already exists.
|
||||
</p>
|
||||
<div style="display: flex; gap: 2rem; justify-content: center">
|
||||
<button @click="goToLogin" class="form-btn">Sign In</button>
|
||||
<button @click="showEmailExistsModal = false" class="form-btn">Cancel</button>
|
||||
<button @click="goToLogin" class="btn btn-primary">Sign In</button>
|
||||
<button @click="handleCancelEmailExists" class="btn btn-secondary">Cancel</button>
|
||||
</div>
|
||||
</ModalDialog>
|
||||
|
||||
@@ -241,10 +241,15 @@ function goToLogin() {
|
||||
router.push({ name: 'Login' }).catch(() => (window.location.href = '/auth/login'))
|
||||
}
|
||||
|
||||
// Clear password fields and close modal
|
||||
// Clear email and password fields and close modal
|
||||
function handleCancelEmailExists() {
|
||||
email.value = ''
|
||||
password.value = ''
|
||||
confirmPassword.value = ''
|
||||
emailTouched.value = false
|
||||
passwordTouched.value = false
|
||||
confirmTouched.value = false
|
||||
signupError.value = ''
|
||||
showEmailExistsModal.value = false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user