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") , but I wanted to ask is this the safest way, is there a better way to secure this?
Was this page helpful?