Let admins delete a signed-in user's account
維護者通常 1 天內回覆
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- api, authentication, backend
研究方向
Start with the existing DELETE /v2/me handler and the admin user routes under /v2/admin/users; the issue names no file or test paths. Trace the deletion transaction, Auth0 cleanup, and advisory lock checks, then inspect the linked pull request #4272 for work already underway. Done means the admin route and shared deletion behavior meet the listed status, authorization, logging, and Auth0 cleanup requirements.
由索引模型根據 Issue 內容生成。
描述
Admins can list signed-in users, read one, change their types and read their type history under /v2/admin/users (#4261), but cannot delete a user's account. Users can delete only their own, with DELETE /v2/me.
Add DELETE /v2/admin/users/{user_id} so that an admin can delete another signed-in user's account and saved records, including the Auth0 users of its sign-in identities, exactly as DELETE /v2/me deletes one's own:
- prepare the Auth0 Management deleter before touching data (503 with nothing deleted when it can't be prepared);
- 204 on success, 502 when an Auth0 deletion fails after the data is gone, 404 for an absent or unauthenticated user ID, 409 for the last admin;
- after the data is deleted, try every one of the account's Auth0 users before reporting a failure, for this route and for
DELETE /v2/me, and say how many remain; - admins only (403 below admin): the router's admin check, plus a check inside the deletion's own transaction under the user-type change advisory lock, as type changes do;
- an admin deleting their own account through this route follows the same last-admin rule as
DELETE /v2/me; - record each deletion as a log event naming the admin's and the deleted user's v2 IDs, never emails or tokens;
- share the deletion logic with
DELETE /v2/merather than copying it.
- 主要語言
- Python
- 星號
- 18
- 分支
- 33
- 平均合併
- 2 天 10 小時
- 30 天內合併 PR
- 124
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PolicyEngine/policyengine-api 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 83/100
PolicyEngine/policyengine-api#4270 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
維護者通常 1 天內回覆
-
Calculate stored households through /v2/household-calculations on the simulation service's household jobs可能已有人在做 @anth-volk 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 35/100
PolicyEngine/policyengine-api#4273 ·
維護者通常 1 天內回覆
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
NVIDIA/nsight-python#88 ·
維護者通常 1 天內回覆
-
Criteria can pass when the deliverable is missing可能已有人在做 @clementtisseau 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
harveyai/harvey-labs#217 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
難度 2/5 1-3 小時 新手友好度 83/100
databrickslabs/ontos#1420 ·
維護者通常 3 天內回覆