fix(api): group-scoped forms unreachable on public route

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
api, authorization

調査の方向性

Read packages/api/src/routes/forms.ts:38-42 and 92-99, then compare the events route's group-scope handling and spec §5.5. Run packages/api/src/routes/forms.test.ts and add coverage for group-scoped reads and submissions. Done means the behavior is fixed and tested, or the admin-only decision is documented in the spec.

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

説明

Summary

GET /forms/:slug and POST /forms/:slug/submissions collapse scope='group' to the same handling as scope='staff_only' — only staff (systemTier >= 1) can read or submit. A group-scoped form should be visible to chairs/members of the attached group, not just staff.

Requirements

  • Decide intentional or fix: per spec §5.5, group scope is "restricted to a specific group's members"
  • If fixing: when form.scope === 'group', plumb a group-membership check using actor.chairedGroupIds + a query for group_memberships against the attached group_id
  • If intentional (admin-only by design), document in the spec
  • Update tests in packages/api/src/routes/forms.test.ts to cover the group-scoped path

Context

Surfaced in the Plan 4 review (PR #2011). The events route has parallel logic for group scope; forms should match.

Files

  • packages/api/src/routes/forms.ts:38-42, 92-99
主要言語
HTML
スター
33
フォーク
107
平均マージ
14時間 6分
マージ済み PR(30日)
19

環境構築

はじめの一歩

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

USRSE/usrse.github.io のほかの issue

USRSE/usrse.github.io の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

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

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