mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
feat(server): handle account deleting properly (#12399)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Users are now prevented from deleting their account if they own one or more team workspaces. A clear error message instructs users to transfer ownership or delete those workspaces first. - Disabled (banned) users are explicitly prevented from signing in or re-registering. - Added new error messages and translations to improve clarity around account deletion restrictions. - **Bug Fixes** - Disabled users are now explicitly handled to prevent sign-in attempts. - **Tests** - Introduced comprehensive end-to-end tests covering account deletion, banning, and re-registration scenarios. - **Chores** - Improved event handling for user deletion and subscription cancellation. - Updated localization resources with new error messages. - Renamed payment event handler class for clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -8614,6 +8614,10 @@ export function useAFFiNEI18N(): {
|
||||
* `Cannot delete own account.`
|
||||
*/
|
||||
["error.CANNOT_DELETE_OWN_ACCOUNT"](): string;
|
||||
/**
|
||||
* `Cannot delete account. You are the owner of one or more team workspaces. Please transfer ownership or delete them first.`
|
||||
*/
|
||||
["error.CANNOT_DELETE_ACCOUNT_WITH_OWNED_TEAM_WORKSPACE"](): string;
|
||||
/**
|
||||
* `Captcha verification failed.`
|
||||
*/
|
||||
|
||||
@@ -2128,6 +2128,7 @@
|
||||
"error.MAILER_SERVICE_IS_NOT_CONFIGURED": "Mailer service is not configured.",
|
||||
"error.CANNOT_DELETE_ALL_ADMIN_ACCOUNT": "Cannot delete all admin accounts.",
|
||||
"error.CANNOT_DELETE_OWN_ACCOUNT": "Cannot delete own account.",
|
||||
"error.CANNOT_DELETE_ACCOUNT_WITH_OWNED_TEAM_WORKSPACE": "Cannot delete account. You are the owner of one or more team workspaces. Please transfer ownership or delete them first.",
|
||||
"error.CAPTCHA_VERIFICATION_FAILED": "Captcha verification failed.",
|
||||
"error.INVALID_LICENSE_SESSION_ID": "Invalid session id to generate license key.",
|
||||
"error.LICENSE_REVEALED": "License key has been revealed. Please check your mail box of the one provided during checkout.",
|
||||
|
||||
Reference in New Issue
Block a user