Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

PrevEmployment: add auth + ownership check to PATCH/DELETE/proof endpoints

オープン
#143 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
fastapi, python

調査の方向性

Start with api/routers/prev_employment.py and inspect how get_current_student and the ownership check are used for the related issue #138. Apply the same authentication and 404 behavior to the three listed endpoints, then add integration tests for unauthenticated, other-user, and owner requests. Done means all three endpoint cases behave as specified.

索引モデルが issue の本文から書いたものです。

説明

Problem

These endpoints in api/routers/prev_employment.py have no auth dependency and do no ownership check, so anyone can modify, delete or upload proof for any previous-employment entry by id:

  • PATCH /prev_employments/{prev_employment_id}/proof
  • DELETE /prev_employments/{prev_employment_id}
  • PATCH /prev_employments/{prev_employment_id}

Tasks

  • Require get_current_student
  • Ownership check: entry must have user_account == user["sub"]; otherwise 404 (no existence leak, consistent with #138)
  • Integration tests: unauthenticated → 401; other user's entry → 404; owner → success

Related: #138

主要言語
Python
スター
0
フォーク
0
平均マージ
39分
マージ済み PR(30日)
10

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ClockGU/clockwork-backend のほかの issue

ClockGU/clockwork-backend の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。