You definitely do not need to add any token session variable values other than an X-Hasura-User-Id
which I assume you have already implemented.
Using Hasura correctly is all about making the proper relationships between your different tables.
It is important to remember, Hasura can use both object and array relationships for row level permissions lookups.
I am going to assume that the following relationships exist (if they do not, you can create them easily).
event => organization
organization => orgUsers (organization_user array relation)
organization_user => user
Event then has a direct lookup path to user.id
and you can check that it equals the X-Hasura-User-Id
. Although this is an _eq
check, remember: the orgUsers
array lookup in that path makes sure that if any orgUser.user.id
matches, they will have row level access.
Comment if you need clarification of any of these points.