Hello, exploring SpiceDb, trying to model a situation we have in our current authz setup with a SpiceDb schema and wondering if there's an easy way to accomplish it.
Basically, we have some schema like this
definition user {}
definition account {
relation internal_admin: user
relation internal_tech: user
permission write = internal_admin
permission view = internal_admin + internal_tech
}
We want to somehow create either internal_admin / internal_tech relationship between a user and account, based on the users job. And the ID of the account would be based on the users Book of Business in our CRM. If a user changes jobs, ideally we wouldn't have to update all relationships to accounts, just the users job. If we want to change what relationship a job should get, again ideally we dont have to update all relationships of all users with that job, just the relationship/job mapping.
Would you have any suggestions?