fix(web): update schema.sql for supabase, fixes file upload (#31)

The RLS policy restricted non-uuid file names from being uploaded to ANY bucket.
This was caused by the "or" condition in the policy. This fixes that by wrapping both "or" conditions in a single set of parentheses.
This commit is contained in:
mk3ext
2024-06-05 06:43:04 +01:00
committed by GitHub
parent 8808e37558
commit 521cba7dd3

View File

@@ -2733,7 +2733,7 @@ create policy account_image on storage.objects for all using (
with
check (
bucket_id = 'account_image'
and kit.get_storage_filename_as_uuid (name) = (
and (kit.get_storage_filename_as_uuid (name) = (
select
auth.uid ()
)
@@ -2741,5 +2741,5 @@ with
auth.uid (),
kit.get_storage_filename_as_uuid (name),
'settings.manage'
)
);
))
);