[Task]: Re-implement restriction checking in API outside of permission mechanism

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
領域
api, backend

調査の方向性

Start by grepping for IsSubmissionAllowedFor and write_permission_classes: the permission class and the API views that list it are the two places to read, then follow the call to RestrictionChecker().is_submission_allowed(). The change moves that check into the add-on submission endpoint only, so metadata edits and source uploads stop being gated. Done means non-submission writes pass while submission is still restricted; the acceptance criteria still reads "item 1", so ask the maintainer what else must be covered.

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

説明

Description

When the Add-on API was implemented, the restrictions checks for add-on submission (RestrictionChecker().is_submission_allowed()) were implemented as a permission, IsSubmissionAllowedFor.

But those restrictions should only apply to add-on submissions, as of now because they are implemented as a permission included in write_permission_classes they are checked for every API call writing add-on data, including modifying metadata or uploading source code, which should not be restricted.

Acceptance Criteria
  • item 1

┆Issue is synchronized with this Jira Task

主要言語
Makefile
スター
135
フォーク
52
平均マージ
6日 18時間
マージ済み PR(30日)
7

環境構築

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

はじめの一歩

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

mozilla/addons のほかの issue

mozilla/addons の issue をすべて見る

似ている issue

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

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

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