This document outlines how to model a common organization-based permission system in Hasura. Let's assume that you have some table structure like the following:
| Table Name | Columns | Foreign Keys |
|---|---|---|
| User | id, name, email | |
| Organization User | id, user_id, organization_id | user_id -> user.id, organization_id -> organization.id |
| Organization | id, name |