Hi! I created two RLS policies: INSERT for authenticated users only and the same for SELECT (check screenshots).
Then I try to INSERT a new row into this table and get this error: postgrest.exceptions.APIError: {'code': '42501', 'details': None, 'hint': None, 'message': 'new row violates row-level security policy for table "kisis_forms"'}
from supabase import create_client, Clientsupabase: Client = create_client(url, key)#Afterwards I do the auth:email: str = str(user_mail)password: str = str(user_pass)supabase.auth.sign_in(email=email, password=password)#Then I try to INSERT a new row and recieve mentioned error:data = supabase.table(table_name).insert({"tg_id": user_id, "name": name}).execute()
from supabase import create_client, Clientsupabase: Client = create_client(url, key)#Afterwards I do the auth:email: str = str(user_mail)password: str = str(user_pass)supabase.auth.sign_in(email=email, password=password)#Then I try to INSERT a new row and recieve mentioned error:data = supabase.table(table_name).insert({"tg_id": user_id, "name": name}).execute()
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.