Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#380 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

@DarioDeSilva đang làm issue này rồi.

Từ ngày 7/10/2026.

  • #378 của @DarioDeSilva — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, python

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
13
Fork
0
Merge trung bình
7 ngày 52 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của kiat/codeAssist

Tất cả issue của kiat/codeAssist

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.