Created
January 22, 2024 15:03
-
-
Save allipiopereira/d7b01632d865e82e85c926e4d5772b14 to your computer and use it in GitHub Desktop.
policies users table - Auth Supabase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create policy "Public notes are viewable by everyone." on users | |
for select using (true); | |
create policy "Users can insert their own notes." on users | |
for insert with check (auth.uid() = id); | |
create policy "Users can update their own notes." on users | |
for update using (auth.uid() = id); | |
-- Policy to allow users to delete their own notes | |
create policy "Users can delete their own notes." on users | |
for delete using (auth.uid() = id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
create policies: select, insert, update and delete