Skip to content

Roles & permissions

The API normalises JWT role to superadmin, admin, teacher, or student. Legacy values (manageradmin, instructorteacher) are still accepted for a transition period.

AreaAdminTeacherStudentSuperadmin
Tenant-wide overview aggregatesyesyes (scoped)noyes
Report job queueyesyesnoyes
GET .../reports/:type/latest (all types)yesyes (rows scoped to courses)only student_learning_profile + assessment_performance (own rows / enrolled courses)yes
Report CSV/JSON downloadyesyes (scoped)noyes
Viewer APIs (profiles / grades)scope rulesscope rulesself (and allowed peers for staff)yes

Students never get tenant-wide aggregates for restricted report types; the API filters rows server-side.

Teacher JWTs include course_ids when the token issuer can infer them (e.g. editing-teacher style enrollments in D1). A separate migration is only needed if your deployment requires a different mapping.

  • requireRole / scopeFilter in ssea-api.
  • Report visibility: canAccessReportLatest plus row filtering in report-jobs.