Database Security
DatabaseVerifiedShare on
Row-level security and privileged functions.
HM Redowan1 min readUpdated 2026-12-04
Bu sayfanın Türkçe çevirisi editör incelemesinde. İngilizce sürüm gösteriliyor.
- Row-level security is enabled with 42 policies.
- Helpers:
is_staff(any role),can_write(super_admin or admin),has_role,my_teacher_id,teacher_sees_student. - Only super administrators may insert, update or delete roles, and never their own.
- Teacher actions run through
SECURITY DEFINERfunctions that verify the teacher, the lesson and the time — execute is revoked from the public and granted to signed-in users only. - The device API uses a server-only admin client after verifying the device token.
- Secrets are never stored in plain text: device tokens and pairing codes as SHA-256, teacher codes as HMAC-SHA-256, uninstall PINs salted with the device id.
Bu sayfa yardımcı oldu mu?