-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Ayon95/cabin_update_migration_files
Add migration files for cabin update functionality
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
supabase/migrations/20240103042944_cabin_update_access_for_authenticated_users.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
create policy "Enable update access for matching authenticated users" | ||
on "public"."cabin" | ||
as permissive | ||
for update | ||
to authenticated | ||
using ((auth.uid() = user_id)); |
15 changes: 15 additions & 0 deletions
15
...base/migrations/20240103044000_storage_read_and_update_access_for_authenticated_users.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
create policy "Enable read access for authenticated users only" | ||
on "storage"."objects" | ||
as permissive | ||
for select | ||
to authenticated | ||
using (true); | ||
|
||
|
||
create policy "Enable update access for authenticated users only" | ||
on "storage"."objects" | ||
as permissive | ||
for update | ||
to authenticated | ||
using (true) | ||
with check (true); |