- Global Roles
- Resource-Specific Roles
- Custom Roles
Global Roles
Global roles live on the highest-level entity (typicallyorganization) and are shared across every resource that entity owns. This is the simplest starting point for RBAC.Define the user entity
Every Permify schema requires a
user entity. It is intentionally empty — other entities reference it as a relation type.Add roles to the organization
Roles are modeled as relations on the entity where they live. Here we define four roles:
admin, member, manager, and agent.Global role permissions defined on
organization apply uniformly to everything owned by that organization. Move to Resource-Specific Roles when different resources need different permission sets.Full Working Schema
The schema below combines all three RBAC patterns into a single coherent model: global roles onorganization, resource-specific permissions on file and vendor, and a custom role entity for fine-grained runtime control.