Create policy where select matches 'abc' #8321
cliveportman
started this conversation in
General
Replies: 1 comment
-
Change of plan. Instead of holding everybody in the profiles table and using a roles table to manage roles, I've created different tables for different user roles. I'm using a conditional in the on_auth_user_created trigger function that puts users in the right table. It should make permissions easier and they all have different columns anyway. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to create a policy where the user can only select from a profiles table, where the profile matches a user in a roles table with a specific role.
Profiles:
id | col1 | col2
Roles:
id | role
I only want profiles returned if they match a row in the roles table with the role column set to 'school_teacher'.
How do I query for this within the policy creator?
Beta Was this translation helpful? Give feedback.
All reactions