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
|
||||
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'
|
||||
)
|
||||
);
|
||||
))
|
||||
);
|
||||
Reference in New Issue
Block a user