mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
Update access-control.mdx to fix missing () and cast to text (#19083)
Using storage.foldername(name)[1] requires this format: (storage.foldername(name))[1] Also comparing the result to auth.uid() requires a cast. I showed using auth.uid()::text as the example.
This commit is contained in:
1 parent
cba1b07b53
commit
2a4e4442b0
1 file changed
+2
-2
@@ -59,7 +59,7 @@ for insert
|
||||
to authenticated
|
||||
with check (
|
||||
bucket_id = 'my_bucket_id' and
|
||||
storage.foldername(name)[1] = 'private'
|
||||
(storage.foldername(name))[1] = 'private'
|
||||
);
|
||||
```
|
||||
|
||||
@@ -72,7 +72,7 @@ for insert
|
||||
to authenticated
|
||||
with check (
|
||||
bucket_id = 'my_bucket_id' and
|
||||
storage.foldername(name)[1] = auth.uid()
|
||||
(storage.foldername(name))[1] = auth.uid()::text
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user