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.

RoleStored asCan
Super administratorsuper_adminEverything, including managing other administrators
AdministratoradminWrite access: students, phones, schedules, permissions, attendance approval
ViewerviewerRead-only panel access
TeacherteacherAttendance 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_roles table.
  • has_role(user, role) checks one role; is_staff(user) means any role; can_write(user) means super_admin or admin.
  • 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?