Backend: create custom role endpoint

Aperta
#589 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with ADR #469 and the custom-roles model in #561, then trace the existing authorization endpoints and permission dependency handling. Implement the superuser-only POST endpoint with role validation, dependency closure, Casbin policy rows in the same transaction, and the audit event described in #587/#588. Done means success and each listed validation path have tests, including non-superuser rejection.

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

Descrizione

willow

Implement the create custom role endpoint defined in the ADR (#469): create a user_defined role for a single resource type with a name, description and an initial permission set, persisted via the custom-roles model (#561) and rendered to Casbin p rows in the same transaction.

Superuser-only. Enforces: single resource type per role; name validation/uniqueness; permission ids valid for the resource type; dependency closure applied (a selected permission pulls in its required dependencies). Backs the create wizard (#571–#573).

Acceptance
  • POST creates a custom role with resource type + permissions; p rows rendered in the same transaction.
  • Superuser-only; non-superuser rejected.
  • Single-resource-type and name-uniqueness validation (400 on violation).
  • Dependency closure enforced server-side (not only in the UI).
  • Audit event recorded (see #587/#588); tests for success and each validation path.
Lingua principale
Python
Stelle
0
Fork
10
Merge medio
5g 5h
PR unite (30g)
22

Preparare l'ambiente

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 openedx/openedx-authz

Tutte le issue di openedx/openedx-authz

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.