Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs(storage): use 'to' field instead of 'auth.role()' in storage access control docs

Simon Bassete667593f6327
diff --git a/apps/docs/pages/guides/storage/access-control.mdx b/apps/docs/pages/guides/storage/access-control.mdx
index 58572bd789e..4adfd73e135 100644
--- a/apps/docs/pages/guides/storage/access-control.mdx
+++ b/apps/docs/pages/guides/storage/access-control.mdx
@@ -117,10 +117,8 @@ using ( bucket_id = 'public' );
-- 1. Allow logged-in access to any files in the "restricted" bucket
create policy "Restricted Access"
on storage.objects for select
-using (
- bucket_id = 'restricted'
- and auth.role() = 'authenticated'
-);
+to authenticated
+using ( bucket_id = 'restricted' );
```
### Allow individual access to a file