I'm wondering how to correctly model this in SpiceDB:
https://play.authzed.com/s/mNNMMnoI4gB_8/schema
- Normal users and admins belong to an organization
- Resources can be viewed/edited by the people who created them (owner_user) and the admins of the organization (owner_org->admin)
- Users can be viewed/edited by the admins of the organization (owner_org->admin)
I think the 3rd requirement can only be modelled if the user has a relation with organization? But the organization already has users as their "member".
organization->member
user->owner_org
Modelling the same relation in both directions (user->org, org->user) seems like a bad idea. Is there a way to model this differently?