Bug #452 — Admin: Training session save returns 403 Forbidden
Issue: #452 Reporter: Kang-Supreeya Date: 2026-02-19 Severity: Critical Frequency: Always
Description
Admin: เมนู จัดการการอบรม > ข้อมูลรอบอบรม กรอกข้อมูลครบถ้วน กดบันทึกขึ้น Error
System Admin cannot create a new training session (รอบอบรม). Clicking "บันทึก" after filling out the session form returns a 403 Forbidden error from the API.
Related: #451 (same 403 error, different endpoint)
Location
System Admin > เครื่องมือ > จัดการอบรม > รอบอบรม > เพิ่มรอบอบรม
Bug Details
| Area | Expected | Actual |
|---|---|---|
| POST /api/training-sessions/create | 200 OK (session created) | 403 Forbidden |
Steps to Reproduce
- Login as System Admin
- Go to เครื่องมือ > จัดการอบรม > รอบอบรม
- Click เพิ่มรอบอบรม
- Fill form (e.g., date "2026-02-19", type "Morning", location "ตึก1", capacity 30)
- Click บันทึก
- Observe — Error 403 Forbidden
Screenshots

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