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:
@@ -2733,7 +2733,7 @@ create policy account_image on storage.objects for all using (
|
|||||||
with
|
with
|
||||||
check (
|
check (
|
||||||
bucket_id = 'account_image'
|
bucket_id = 'account_image'
|
||||||
and kit.get_storage_filename_as_uuid (name) = (
|
and (kit.get_storage_filename_as_uuid (name) = (
|
||||||
select
|
select
|
||||||
auth.uid ()
|
auth.uid ()
|
||||||
)
|
)
|
||||||
@@ -2741,5 +2741,5 @@ with
|
|||||||
auth.uid (),
|
auth.uid (),
|
||||||
kit.get_storage_filename_as_uuid (name),
|
kit.get_storage_filename_as_uuid (name),
|
||||||
'settings.manage'
|
'settings.manage'
|
||||||
)
|
))
|
||||||
);
|
);
|
||||||
Reference in New Issue
Block a user