Hey folks. I'm attempting to model a user-defined role schema using
https://authzed.com/blog/user-defined-roles as the inspiration (thanks!). On top of that, I'd like to model a tiered level or rank system, such that instead of assigning roles to individual users, they are assigned to the level/rank and users get all the roles that are at their level.
For example, assume there are 4 access levels, 1 being the highest, and 4 being the lowest. If level 2 users are given the role that allows them to raise another user's access level, I want it so they can only perform that action on users at a lower level than they are.
Do you have any tips or guides for how to go about this? Can it be modelled in the schema or is this something that can only take place in code?