feat(account): keep complaints on deletion, clear their typed-in contact; say so in the privacy draft
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
96adbce3a9
commit
e742da268d
@@ -65,7 +65,7 @@ export function AccountDeletionSection() {
|
||||
<ul>
|
||||
{ACCOUNT_DELETION_DELETED_ITEMS.map((item) => <li key={item}>{item}</li>)}
|
||||
</ul>
|
||||
<p>剩余点数和会员权益会一并作废,不退款。订单和点数流水按法规保留,但不再与你的身份关联。</p>
|
||||
<p>剩余点数和会员权益会一并作废,不退款。订单和点数流水按法规保留,但不再与你的身份关联;你提交过的反馈与投诉保留处理记录,其中的联系方式会删除。</p>
|
||||
<p className="account-deletion-contact">有疑问可以先联系我们:{LEGAL_ENTITY.contactEmail}</p>
|
||||
<label className="account-deletion-input">
|
||||
<span>输入「{ACCOUNT_DELETION_CONFIRM_WORD}」确认</span>
|
||||
|
||||
@@ -34,6 +34,8 @@ export const ACCOUNT_DELETION_KEPT_TABLES = [
|
||||
"usage_reservations",
|
||||
"user_product_redemptions",
|
||||
"user_subscriptions",
|
||||
// Complaint handling records; the typed-in contact is cleared at purge.
|
||||
"user_feedback",
|
||||
] as const;
|
||||
|
||||
/** What the confirmation dialog tells the user will be deleted. */
|
||||
|
||||
@@ -49,7 +49,7 @@ export const TERMS: LegalDocument = {
|
||||
paragraphs: [
|
||||
"你可以使用邮箱验证码注册和登录,也可以为账号设置密码。请妥善保管邮箱与密码,不要把账号转借他人使用;通过你的账号进行的操作视为你本人的操作。",
|
||||
"本服务不面向 14 周岁以下的未成年人。14 周岁以上、未满 18 周岁的未成年人,应在监护人同意与指导下使用。",
|
||||
"你可以在账户菜单中申请注销账号。注销申请提交后有 7 天冷静期,期间重新登录即可撤销;冷静期满后,你的对话、星盘档案、报告与出生时间校正记录以及账号本身将被删除,账号内剩余的点数同时作废且不可恢复。法律法规要求保留的订单与点数流水将以去除个人身份信息的方式保留。",
|
||||
"你可以在账户菜单中申请注销账号。注销申请提交后有 7 天冷静期,期间重新登录即可撤销;冷静期满后,你的对话、星盘档案、报告与出生时间校正记录以及账号本身将被删除,账号内剩余的点数同时作废且不可恢复。法律法规要求保留的订单与点数流水将以去除个人身份信息的方式保留;你提交过的反馈与投诉会保留处理记录,但删除你填写的联系方式。",
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -157,7 +157,7 @@ export const PRIVACY: LegalDocument = {
|
||||
title: "四、保存期限",
|
||||
paragraphs: [
|
||||
"· 账号、出生资料、对话、报告与校正记录:在你的账号存续期间保存;你删除某条对话或某个人物档案时,相应数据随之删除。",
|
||||
"· 注销账号:冷静期 7 天满后,上述数据与账号一并删除;法律法规要求保留的订单与点数流水去除个人身份信息后保存,期限依法确定【待确认:保存年限】。",
|
||||
"· 注销账号:冷静期 7 天满后,上述数据与账号一并删除;法律法规要求保留的订单与点数流水去除个人身份信息后保存,期限依法确定【待确认:保存年限】;反馈与投诉保留处理记录并删除其中的联系方式【待确认:保存年限】。",
|
||||
"· 内容安全命中日志:去除身份信息后保存【待确认:保存期限】。",
|
||||
"· 出生时间校正的匿名统计:保存 180 天。",
|
||||
"· 服务器日志:【待确认:保存期限】。",
|
||||
|
||||
@@ -110,7 +110,10 @@ as $$
|
||||
'usage_ledger',
|
||||
'usage_reservations',
|
||||
'user_product_redemptions',
|
||||
'user_subscriptions'
|
||||
'user_subscriptions',
|
||||
-- Complaints and feedback are kept for handling records (2026-09-30,
|
||||
-- product decision); the typed-in contact is cleared at purge below.
|
||||
'user_feedback'
|
||||
]::text[];
|
||||
$$;
|
||||
|
||||
@@ -343,6 +346,13 @@ begin
|
||||
using errcode = '55000';
|
||||
end if;
|
||||
|
||||
-- Kept complaints lose the contact the user typed in (it may be a phone or
|
||||
-- an email); the body stays for the handling record.
|
||||
if to_regclass('public.user_feedback') is not null then
|
||||
execute 'update public.user_feedback set contact = null, updated_at = now() where user_id = $1'
|
||||
using v_user;
|
||||
end if;
|
||||
|
||||
-- The identity becomes an anonymous tombstone: no email, name, image,
|
||||
-- login method, session or pending verification. Kept financial rows point
|
||||
-- at it and at nothing else.
|
||||
|
||||
@@ -53,6 +53,9 @@ test("the kept tables in code and in SQL are the same list, and finance is kept"
|
||||
const sqlList = migration.slice(migration.indexOf("select array["), migration.indexOf("]::text[]"));
|
||||
const sqlTables = [...sqlList.matchAll(/'([a-z_]+)'/g)].map((match) => match[1]);
|
||||
assert.deepEqual(sqlTables, [...ACCOUNT_DELETION_KEPT_TABLES]);
|
||||
// 2026-09-30 合并时加入:反馈与投诉保留(产品决定),联系方式在清除时置空。
|
||||
assert.match(migration, /'user_feedback'/);
|
||||
assert.match(migration, /update public\.user_feedback set contact = null/);
|
||||
for (const table of ["payment_orders", "credit_transactions", "usage_ledger", "usage_reservations", "user_subscriptions", "birth_time_rectification_billing"]) {
|
||||
assert.ok((ACCOUNT_DELETION_KEPT_TABLES as readonly string[]).includes(table), table);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user