Petition: link student user_account on creation / first login; clerk endpoints by petition
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
調査の方向性
Start with the migration and schema patterns in issues #138 and #141, then read api/security.py where first-login Employee creation is handled. Trace petition creation and both clerk routes named in the issue, and add integration tests for linking at creation and first login, preserving existing links, and resolving both endpoints without username lookups. Done means the schema, linking paths, routes, and acceptance tests all match the stated behavior.
索引モデルが issue の本文から書いたものです。
説明
Context
Petitions identify the student only by student_username (the supervisor only knows the username, and the student may not have an account yet). Usernames are fine for sending mail but not for identity: the planned account fusion maps several usernames of one human to one user. Clerk endpoints currently resolve students by username.
Decision
- Add
Petition.student_user_account: nullableuuid, FK →employee.user_accountwithON UPDATE CASCADE(same pattern as #138 / #141) - On petition creation: if an
Employeewithstudent_usernameexists, set it immediately - On first login (branch in
api/security.pywhere the Employee is created):UPDATE petition SET student_user_account = :sub WHERE student_username = :username AND student_user_account IS NULL - Username is used only once as the binding key; afterwards identity is
user_account
Tasks
- Migration + schema; backfill existing petitions from
employee.username - Linking on petition creation and on first login
-
GET /clerk/petitions/{petition_id}/documents(from #138): resolve viapetition.student_user_accountinstead of the username join (contract unchanged) - Replace
GET /clerk/prev_employments/petition/{petition_id}withGET /clerk/petitions/{petition_id}/prev_employments, resolved viapetition.student_user_account(breaking change for the frontend; remove the old route)
Acceptance criteria (integration tests)
- Petition for an existing student is linked at creation
- Petition for an unknown student is linked on the student's first login
- Already-linked petitions are not overwritten
- Both clerk endpoints work without any username lookup
Related: #138, #141
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 39分
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ClockGU/clockwork-backend のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ClockGU/clockwork-backend#169 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#165 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#164 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#163 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ClockGU/clockwork-backend#162 ·
メンテナーはふだん 1 日以内に返信
ClockGU/clockwork-backend の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pytest-dev/pyfakefs#1367 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
IFEvalG exclude_word_harder misses the keyword next to punctuation, at the start or end of the text, and in other letter case対応中かも @damienen が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
allenai/open-instruct#2151 ·
メンテナーはふだん 1 日以内に返信
-
feat(plan): support convertorLabels and convertorAffinity in Plan resource対応中かも @AmenB が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
RedHatQE/openshift-python-wrapper#2849 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 25 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
libnativeapi/nativeapi#21 ·