New content-library response serializes can_edit_library without request context
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
調査の方向性
openedx/core/djangoapps/content_libraries/rest_api/libraries.py の LibraryRootView.post と serializers.py の権限メソッドから始めます。作成者としてライブラリを作成し、その can_edit_library の値を、作成者、reader、アクセスを拒否された呼び出し元に対する詳細 GET と比較します。作成レスポンスが作成者の実際の権限を反映し、認可を弱めていなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Checked 2026-09-30: master source at ca039029e4918f02903b1c7d62adf8b3ad74f75b and release/verawood source at 18ce9a9c2b20c745b0ee94f615c13855acd9624b. Both carry this code path. This is a source diagnostic; no upstream full integration suite or production mutation ran.
LibraryRootView.post grants the creator admin permissions and then constructs the response serializer without request context. The serializer permission method returns false when context has no request. The library detail GET does supply request context.
Reproduction: create a v2 library as an author allowed to create libraries; inspect can_edit_library in the POST response, then fetch the detail as the same author. The create response follows the no-request/false branch despite the just-granted permissions; the context-aware detail can report the actual permission.
Expected: the successful create response reports the creator's actual edit permission, consistently with the detail response. Pass the request through get_serializer or explicit serializer context. Test creator, reader and denied caller without weakening authorization.
This report's current-source claim is the missing context and deterministic serializer false branch. No fresh end-to-end library creation ran for this filing. Duplicate checks: current issue/PR searches for LibraryRootView and can_edit_library context returned no matching report.
- 主要言語
- Python
- スター
- 8.2k
- フォーク
- 4.4k
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openedx/openedx-platform のほかの issue
-
Discussion API: missing thread returns 500 (ForumV2RequestError not mapped to ThreadNotFoundError)再び着手できるかも @mbhavu2007-lang が 16 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openedx/openedx-platform#39225 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
v3 notification preferences: PUT with email_cadence but no notification_channel raises KeyError (500)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
openedx/openedx-platform#39221 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openedx/openedx-platform#39084 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
openedx/openedx-platform#38792 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openedx/openedx-platform#38544 ·
メンテナーはふだん 1 日以内に返信
openedx/openedx-platform の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
btclib-org/btclib-wallet#1045 ·
メンテナーはふだん 1 日以内に返信
-
area-templates triage:bot-seen triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/aspire#22356 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[Train] An elastic ScalingConfig(num_workers=(0, 0)) is accepted and the run waits forever対応中かも @wguo7 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ray-project/ray#68217 ·
メンテナーはふだん 2 日以内に返信