Admin access is not consistent

Chiusa
#631 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@raisedadead ci sta già lavorando.

Dal 13/10/2026.

  • #630 di @raisedadead — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
authorization

Direzione di ricerca

Read pages/api/create_class_teacher.ts, pages/api/deleteclass.ts, pages/api/editclass.ts, and the two dashboard paths named in the issue to map the current role checks. The team must first choose one of the two access rules described; then verify that create, edit, delete, and dashboard access follow that rule consistently.

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

Descrizione

enhancement
Is your feature request related to a problem? Describe it.

An admin can create a class for any teacher (pages/api/create_class_teacher.ts) and delete any class (pages/api/deleteclass.ts). An admin cannot:

  • Edit a class. pages/api/editclass.ts allows only the TEACHER role.
  • Open a class dashboard. pages/dashboard/v2/[id].tsx and pages/dashboard/v2/details/[id]/[studentEmail].tsx allow only the class owner, so an admin goes to /classes, then to /admin.
Describe the solution you want

The team selects one rule:

  1. Admins can create, edit, delete and view every class.
  2. Only the class teacher can manage a class. Admins manage users only.
Describe the alternatives you considered

Keep the current rules. Admins then can delete a class that they cannot open.

The paths are from the TypeScript code in #625 and #630.

Lingua principale
TypeScript
Stelle
156
Fork
141
Merge medio
10h 16m
PR unite (30g)
65

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 freeCodeCamp/classroom

Tutte le issue di freeCodeCamp/classroom

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.