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

Aperta
#16,602 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Makefile
Stelle
135
Fork
52
Merge medio
6g 18h
PR unite (30g)
7

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mozilla/addons

Tutte le issue di mozilla/addons

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.