Shaik Mohammad Abdullah
12/08/2025, 2:13 AMpermit support automation2
12/08/2025, 2:13 AMAsk Inkeep
12/08/2025, 2:13 AMAsk Inkeep
12/08/2025, 2:13 AMawait permit.api.roleAssignments.assign({
role: "project_admin",
tenant: "default",
resource_instance: `Project:${project.id}`,
user: "<mailto:user@example.com|user@example.com>",
}) ;
To get all project instances a user is authorized for, you can use the getUserPermissions function (3) :
const transactionInstances = await permit.getUserPermissions(key, [tenant], [], ["Transaction"]) ;
For your projects, this would look like:
• Query all Project resource instances the user has any role on
• The function will return instances where the user has project_admin or project_coordinator roles
• Your super_admin with tenant-level RBAC role would still have access to all projects through standard RBAC checks
This approach combines RBAC (for super_admin) and ReBAC (for project-specific roles) without requiring additional roles (4) . The ReBAC model handles the project-level permissions through resource roles and relationships (1) , while RBAC handles the global super_admin access (4) .Ask Inkeep
12/08/2025, 2:13 AM