Move Organization affiliation-date lock off Current.user
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ruby
- 領域
- authorization, backend
調査の方向性
Read CLAUDE.md’s “Authorization lives in policies” rule, then trace Organization#affiliation_dates_locked and the controller and admin service callers that save organizations. Inventory callers that currently rely on Current.user to bypass the lock, including dedupe merges; determine how each would supply the proposed flag. Done means the callers are accounted for so moving the permission decision into a policy does not break their saves.
索引モデルが issue の本文から書いたものです。
説明
🤖 From Claude: Organization#affiliation_dates_locked is skipped for admins by reading Current.user&.super_user? inside the model. Models shouldn't make permission decisions (see the "Authorization lives in policies" rule in CLAUDE.md, added in #2831).
Proposed fix
- The controller asks a policy rule (e.g.
OrganizationPolicy#edit_affiliation_dates?). - It hands the model a flag, the way story ideas set
organization_required.
Why blocked
- Admin-run services that save organizations (e.g. dedupe merges) currently bypass the lock through
Current.user. - With a flag, each of those callers has to set it, or its saves start failing validation.
- They need to be inventoried first.
- 主要言語
- Ruby
- スター
- 15
- フォーク
- 28
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 227
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rubyforgood/awbw のほかの issue
-
blocked
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
rubyforgood/awbw#2824 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rubyforgood/awbw#2822 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rubyforgood/awbw#2160 ·
メンテナーはふだん 1 日以内に返信
-
Update callout faq defualt text when the new person subscription launches対応中かも @maebeale が 77 日前に担当しました。 オープンblocked
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rubyforgood/awbw#2095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
rubyforgood/awbw#2088 ·
メンテナーはふだん 1 日以内に返信
rubyforgood/awbw の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
up-for-grabs/up-for-grabs.net#6330 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
TheOdinProject/curriculum#31490 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
hotwired/turbo-rails#791 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
FinanceFlash/unvibecode#273 ·