Skip to content

Commit

Permalink
fix: supabase - new policy
Browse files Browse the repository at this point in the history
  • Loading branch information
luizchaves committed Sep 1, 2024
1 parent 76e727c commit c4fa11f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ export const CONTENT_SLUGS = [
'w3c/dom-api',
// 'ecma/date',
'w3c/local-storage',
// 'ecma/promise',
'ecma/promise',
'api/rest',
// 'package/json-server',
// 'package/supabase-api',
'package/supabase-api',
'w3c/fetch-api',
'package/axios',
'package/supabase-client',
Expand Down
17 changes: 7 additions & 10 deletions src/content/classnotes/package/supabase-api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ values
[Row Level Security](https://supabase.com/docs/guides/auth/row-level-security) (Authentication > Configuration > Policies):

```text
-- Turn on security
alter table "investments"
enable row level security;
-- Allow anonymous access
CREATE POLICY "Allow anonymous access"
ON investments
FOR SELECT
TO anon
USING (true);
CREATE POLICY "Allow public access"
ON "public"."investments"
as PERMISSIVE
FOR ALL
TO public
USING (true)
WITH CHECK (true);
```

### Rotas
Expand Down

0 comments on commit c4fa11f

Please sign in to comment.