- Форкујте репозиторијум
- Направите
Supabase
профил - Копирајте
Project URL
иanon
public
кључеве - Можете креирати
.env
датотеку и подесити променљиве овако:
PUBLIC_SUPABASE_URL=
PUBLIC_SUPABASE_ANON_KEY=
- У
SQL Editor
наSupabase
залепите ово:
-- First, drop existing policies
drop policy if exists "Enable insert for anonymous users" on pastes;
drop policy if exists "Enable select for anonymous users" on pastes;
drop policy if exists "Anyone can create pastes" on pastes;
drop policy if exists "Anyone can read pastes" on pastes;
-- Disable RLS temporarily to ensure clean slate
alter table pastes disable row level security;
-- Enable RLS again
alter table pastes enable row level security;
-- Create policies with explicit permissions
create policy "Public insert access"
on pastes for insert
with check (true);
create policy "Public select access"
on pastes for select
using (true);
-- Grant necessary permissions to the anon role
grant usage on schema public to anon;
grant all on pastes to anon;
grant usage on all sequences in schema public to anon;
Note
drop policy није потребан, он служи само ако је корисник погрешио.