Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Admin course and student management pages don't work for admins

Aperta
#380 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@DarioDeSilva ci sta già lavorando.

Dal 7/10/2026.

  • #378 di @DarioDeSilva — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, python

Direzione di ricerca

Start with pages/admin/courses/manage.js and pages/admin/students/manage.js, then trace the backend routes those pages call, including require_course_role and get_user_enrollments. Compare the proposed admin-only endpoints with the existing course-role checks; the issue notes that option 2 keeps those checks simple. Done means admins can manage courses and view the selected student's enrollments without granting access to non-admins.

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

Descrizione

The admin pages for managing a course and viewing a student call routes that only allow people enrolled in that course, or that ignore the parameter the page sends. An admin who isn't enrolled in the course gets 403s or the wrong data. This is separate from the auth fix in #366, which made the admin pages send the session cookie but didn't change these routes.

pages/admin/courses/manage.js:

  • get_course_info: requires student, TA or instructor in the course.
  • get_course_enrollment: requires instructor or TA in the course.
  • update_course: requires instructor in the course.
  • delete_course: requires instructor in the course.
  • create_enrollment: requires a staff role in the course.
  • leave_course: has no auth at all (see the other issue).

pages/admin/students/manage.js:

  • Calls get_user_enrollments?user_id=<student>, but the backend ignores user_id and returns the logged-in user's own enrollments. The page shows the admin's courses, not the student's.

Options:

  1. Let a global admin pass these course checks, either inside require_course_role or with separate admin endpoints.
  2. Add admin-only endpoints for the admin panel (for example, a user's enrollments by id) and point the admin pages at them.

Option 2 keeps the course role checks simple and makes admin access explicit.

Lingua principale
Python
Stelle
13
Fork
0
Merge medio
2h 4m
PR unite (30g)
1

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun 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 kiat/codeAssist

Tutte le issue di kiat/codeAssist

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.