Implementation
First, define a new Role type to represent custom roles. When an end user creates a custom role, Oso stores its metadata and unique ID in the application database. End user can grant permissions to the role by writing grants_permission facts to Oso Cloud.Best practices for modeling
Start by declaring the organization-level permissions you want to make configurable, then inherit those permissions on repositories. To avoid exposing excessive or overly granular access through custom roles, separate permissions into two categories:- Low-level actions your application enforces via oso.authorize calls
- Higher-level, user-facing permissions that can be assigned to roles and managed by end users of your application