Here's the thing. I have the 3 tables depicted here:
People on my application can place orders. Then, I want
- a user with
rex
permission to see all theorders
table's rows - a user with
delivery
permission to only see the rows of theorders
table that have thezip
column set to thedelivery
user'szip
From the orders
table, I can get for each order a zip
. With the table zip_user
, I can get a user_id
out of a zip
. Out of that user_id
, I can get the delivery user from the users
table.
While it is trivial to get the rex
to see all of the orders
table, I have not yet been able to configure the permissions for the delivery
user. What do I need to do?
In other words, given the user performing a select on the orders
table has x-hasura-user-id
set to some user id and x-hasura-role
set to delivery
, how does that user get only the rows from the orders
table that match with the zip
s associated with that user's user_id
?