Bazat e të dhënave

Row-level security (RLS)

Në shqip: Siguria në nivel rreshti

ShpjegimiSQ

Me RLS, vetë databaza vendos cilët rreshta mund të shohë çdo përdorues — p.sh. „çdo nxënës sheh vetëm notat e veta“ — edhe nëse aplikacioni harron kontrollin. Supabase mbështetet fort te RLS.

EnglishEN

With RLS the database itself decides which rows each user may see — e.g. “each student sees only their own grades” — even if the application forgets the check. Supabase relies heavily on RLS.

Si ta mendosh

Si një arkivë ku çdo person mund të hapë vetëm dosjet me emrin e vet.

Lexoje në anglisht

Like an archive where each person can open only the files with their name.

Shembull kodisql

ALTER TABLE notat ENABLE ROW LEVEL SECURITY;
CREATE POLICY vetem_te_miat ON notat
  USING (nxenes_id = auth.uid());

Terma të lidhur