Hard time understanding Ash Policies, what would you do?

Hi,
I’m learning elixir phoenix and ash Framework at the moment and i’m still very new to the ash topic.
I’m creating a simple app with chat rooms where you should be able to create a public or private chatroom and people should be able to check all available chat rooms (the public ones and the ones where they are a member of).
When securing the Chatrooms with an Ash Read Policy, i couldn’t figure out how to check if the user had a membership in the chat room (i have one table for the chat rooms and one for the membership). i’ve tried authorize if matches() custom simple policies. Is my data design ok and how would you approach such a problem?

omg i finally got it! has_many relationship on the chatroom, loading the relationship in the query, and than i can authorize_if expr(…) like a breeze. Maybe there is a even better solution? But i’m glad that it works now