User Roles
ODAK SystemVerifiedShare on
Roles and what each may do.
HM Redowan1 min readUpdated 2026-12-04
Bu sayfanın Türkçe çevirisi editör incelemesinde. İngilizce sürüm gösteriliyor.
| Role | Stored as | Can |
|---|---|---|
| Super administrator | super_admin | Everything, including managing other administrators |
| Administrator | admin | Write access: students, phones, schedules, permissions, attendance approval |
| Viewer | viewer | Read-only panel access |
| Teacher | teacher | Attendance for own lessons, lesson unlocks, task unlocks for own class |
| Student | — | No account; identified by the paired phone |
How roles are checked
- Roles live in a separate
user_rolestable. has_role(user, role)checks one role;is_staff(user)means any role;can_write(user)meanssuper_adminoradmin.- These functions are used inside row-level security policies, so the database enforces them — not just the screen.
- A super administrator cannot delete their own role.
Bu sayfa yardımcı oldu mu?