Admin course and student management pages don't work for admins
Đá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
- Lĩnh vực
- backend-api-design, full-stack
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 ignoresuser_idand returns the logged-in user's own enrollments. The page shows the admin's courses, not the student's.
Options:
- Let a global admin pass these course checks, either inside
require_course_roleor with separate admin endpoints. - 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của kiat/codeAssist
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
kiat/codeAssist#391 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
kiat/codeAssist#364 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
kiat/codeAssist#393 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 63/100
kiat/codeAssist#392 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
kiat/codeAssist#390 ·
Tất cả issue của kiat/codeAssist
Issue tương tự
-
component:benchmark
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
agentic-os-org/ANOLISA#9177 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
distrochooser/distrochooser#520 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Status: Needs confirmation Status: Needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Published Docker images lack the redis extra: HEADROOM_COMPRESS_SESSION_STORE stops startupCó thể đã có người làm @AlessandroSpallina đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
headroomlabs-ai/headroom#4513 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
codespell-project/codespell#4060 ·
Maintainer thường phản hồi trong vòng 1 ngày