File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 steps :
1717 - name : Ping Supabase Database
1818 env :
19- DEFAULT_URL : " https://lnxprlvmyhqxkzarrzac.supabase.co "
20- DEFAULT_KEY : " eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxueHBybHZteWhxeGt6YXJyemFjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODc0MDAwMDIsImV4cCI6MjEwMjk3NjAwMn0.fb4njNTFQZMcZPuvHE96i8zfX7CXCTGVN10A6wYDZUs "
19+ DEFAULT_URL : ${{ secrets.SUPABASE_URL }}
20+ DEFAULT_KEY : ${{ secrets.SUPABASE_KEY }}
2121 PROJECTS : ${{ secrets.SUPABASE_PROJECTS }}
2222 run : |
2323 if [ -n "$PROJECTS" ]; then
Original file line number Diff line number Diff line change 4444-- Berikan izin akses RPC ke role anon (web client) & authenticated
4545GRANT EXECUTE ON FUNCTION next_order_no() TO anon, authenticated;
4646
47- -- Aktifkan Row Level Security (RLS) & Policy Akses Publik
47+ -- Aktifkan Row Level Security (RLS) & Policy Akses
4848ALTER TABLE transaksi ENABLE ROW LEVEL SECURITY;
4949
50+ DROP POLICY IF EXISTS " Allow public read transaksi" ON transaksi;
5051CREATE POLICY " Allow public read transaksi"
5152 ON transaksi FOR SELECT
5253 USING (true);
5354
55+ DROP POLICY IF EXISTS " Allow public insert transaksi" ON transaksi;
5456CREATE POLICY " Allow public insert transaksi"
5557 ON transaksi FOR INSERT
5658 WITH CHECK (true);
5759
60+ DROP POLICY IF EXISTS " Allow public update transaksi" ON transaksi;
5861CREATE POLICY " Allow public update transaksi"
5962 ON transaksi FOR UPDATE
60- USING (true);
63+ USING (true)
64+ WITH CHECK (true);
65+
66+ -- Catatan: Operasi DELETE sengaja TIDAK diberi policy publik (hanya bisa via service_role/admin) untuk mencegah penghapusan data transaksi.
You can’t perform that action at this time.
0 commit comments