Skip to content

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

Point out the nesting effect of policies (#3958)

Stephan Bogner5b1969e132e9
diff --git a/web/docs/guides/auth/row-level-security.mdx b/web/docs/guides/auth/row-level-security.mdx
index bc428c0f720..64299a5d65f 100644
--- a/web/docs/guides/auth/row-level-security.mdx
+++ b/web/docs/guides/auth/row-level-security.mdx
@@ -131,6 +131,8 @@ create policy "Team members can update team details if they belong to the team."
);
```
+**Note:** If RLS is also enabled for _members_, the user must also have read (_select_) access to _members_. Otherwise the joined query will not yield any results.
+
### Policies with security definer functions
Policies can also make use of `security definer functions`. This is useful in a many-to-many relationship where you want to restrict access to the linking table. Following the `teams` and `members` example from above, this example shows how you can use security definer function in combination with a policy to control access to the `members` table.