Account deletion: endpoint + student branch
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in api/routers/employee.py and read the existing JWT and role dispatch patterns, plus the file deletion helpers in api/utils.py. The student branch must capture petition and file data before deleting the Employee and committing, then clean up files, schedule the required emails, and refresh the clerk list when applicable. Check the endpoint behavior for each role and confirm the student branch returns 204; the issue also requires a frontend logout change, but does not name its files or tests.
由索引模型根据 Issue 内容生成。
描述
Part of the Account deletion parent (#181). Depends on (a) #178.
Tasks
-
DELETE /employees/meinapi/routers/employee.py, usingdecode_user_jwt(notget_current_student) and dispatching onuser_role:- student → this issue
- supervisor → (c), returns
204until then - clerk →
403
- Student branch (handler):
- Load the Employee by
sub, or404if none exists - Capture the non-completed petitions linked via
student_user_account(id, student_username, start/end date, status, supervisor_mail, budget approvers) and all uploaded file names (StudentDocuments*_file, PrevEmploymentproof) - Delete the Employee (DB cascade removes documents, prev employments, petitions, budget positions) and commit
- Delete the files via
delete_student_doc_file/delete_prev_emp_file(api/utils.py), best effort with logging - Mail the supervisor + all budget approvers per captured petition (new DE+EN template via
EmailHandler+BackgroundTasks) - If any deleted petition had a clerk-relevant status, push the refreshed clerk list via
send_serialized_data_to_clerks - Return
204
- Load the Employee by
- Frontend changes doc: logout right after
204
- 主要语言
- Python
- 星标
- 0
- 派生
- 0
- 平均合并
- 12 小时 7 分钟
- 30 天内合并 PR
- 18
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ClockGU/clockwork-backend 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
ClockGU/clockwork-backend#189 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
ClockGU/clockwork-backend#183 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ClockGU/clockwork-backend#182 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
ClockGU/clockwork-backend#169 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
ClockGU/clockwork-backend#181 ·
维护者通常 1 天内回复
查看 ClockGU/clockwork-backend 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
bug (unverified)
难度 2/5 1-3 小时 新手友好度 62/100
scikit-hep/awkward#4581 · 1 条评论 ·
维护者通常 1 天内回复
-
ci-cd priority: low
难度 2/5 1-3 小时 新手友好度 75/100
LearningCircuit/local-deep-research#9163 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
supersonic-lumina/ENM156#50 ·
维护者通常 2 天内回复