Skip to content

Commit c4fa11f

Browse files
committed
fix: supabase - new policy
1 parent 76e727c commit c4fa11f

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/consts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ export const CONTENT_SLUGS = [
4747
'w3c/dom-api',
4848
// 'ecma/date',
4949
'w3c/local-storage',
50-
// 'ecma/promise',
50+
'ecma/promise',
5151
'api/rest',
5252
// 'package/json-server',
53-
// 'package/supabase-api',
53+
'package/supabase-api',
5454
'w3c/fetch-api',
5555
'package/axios',
5656
'package/supabase-client',

src/content/classnotes/package/supabase-api/index.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,13 @@ values
5050
[Row Level Security](https://supabase.com/docs/guides/auth/row-level-security) (Authentication > Configuration > Policies):
5151

5252
```text
53-
-- Turn on security
54-
alter table "investments"
55-
enable row level security;
56-
57-
-- Allow anonymous access
58-
CREATE POLICY "Allow anonymous access"
59-
ON investments
60-
FOR SELECT
61-
TO anon
62-
USING (true);
53+
CREATE POLICY "Allow public access"
54+
ON "public"."investments"
55+
as PERMISSIVE
56+
FOR ALL
57+
TO public
58+
USING (true)
59+
WITH CHECK (true);
6360
```
6461

6562
### Rotas

0 commit comments

Comments
 (0)