Hello, I have a question regarding schema definitions and user defined roles, been reading the [article](
https://authzed.com/blog/user-defined-roles) about user-defined roles, but I does not really fit my example as I want to have the predefined roles int the schema itself.
I have a system that has
users that belongs to
orgs,
apps that belongs to
orgs and
users can have roles over
apps,
viewer, editor admin. The available permissions for these predefined roles are.
- admin: create/delete/view/edit
- viewer: view
- editor: view/edit.
I would like to provide custom roles at the
org level. I have came up [with a solution](
https://play.authzed.com/s/6tI77U6bCyxb/schema) that I think works good, but given that I am pretty new to this, I am unsure whether I am doing something totally wrong
What I do is I define
orgs/app/users as definitions and also a new one called
custom_role
, where I define the organization relationship, and also 'self relationships' one per 'permissions' in apps. With this in-place I just need to add these custom_org permissions from orgs to the calculation of app permissions, is this correct?