Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’4y agoβ€’
11 replies
rinorzk

Is there a way to restrict selecting of only certain rows based on a table column through RLS?

I have a table for rooms let's say, and I have two types or rooms, public and private, so I want to list all the public rooms to the user, however I don't want to include the private ones unless the user is a member of that room (added from the admin). Now ofc in my application I can use the
eq("type", "public")
eq("type", "public")
, but I wanted to ask is this the safest way, is there a better way to secure this?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Securing rows based on another table.
SupabaseSSupabase / help-and-questions
4y ago
RLS - Restrict based on a token
SupabaseSSupabase / help-and-questions
4y ago
Selecting table rows right after inserting a new one
SupabaseSSupabase / help-and-questions
3w ago
Is there a way to only allow editing of specific colums?
SupabaseSSupabase / help-and-questions
3y ago