Bug #451 — Admin: Training schedule save returns 403 Forbidden
Issue: #451 Reporter: Kang-Supreeya Date: 2026-02-19 Severity: Critical Frequency: Always
Description
Admin: เมนู จัดการการอบรม > เพิ่มแผนการอบรม กดบันทึกขึ้น Error
System Admin cannot create a new training schedule. Clicking "บันทึก" (Save) after filling out the form returns a 403 Forbidden error from the API.
Location
System Admin > เครื่องมือ > จัดการอบรม > เพิ่มแผนการอบรม
Bug Details
| Area | Expected | Actual |
|---|---|---|
| POST /api/training-schedules/create | 200 OK (schedule created) | 403 Forbidden |
Steps to Reproduce
- Login as System Admin
- Go to เครื่องมือ > จัดการอบรม
- Click เพิ่มแผนการอบรม
- Fill form (e.g., name "ทดสอบ", capacity 30, time 09:00-12:00, location "ตึกเอ")
- Click บันทึก
- Observe — Error 403 Forbidden
Screenshots

What to Test
| # | Test Case | Status |
|---|---|---|
| 1 | Admin creates new training schedule → Saved successfully | ⌛ Pending |
| 2 | Non-admin role → Correctly returns 403 | ⌛ Pending |