Data Models
Permissions
Permissions define what actions a user can perform within an organization.
Permission Model
Permissions follow a resource:action format. They are grouped into roles and assigned to users through organization memberships.
| Permission | Description |
|---|---|
users:read | View user profiles and listings |
users:write | Create, update, and delete users |
orgs:manage | Manage organization settings and billing |
webhooks:manage | Create and configure webhook endpoints |
Checking Permissions
check-perms.ts
const allowed = await interna.permissions.check({
userId: "usr_2xK9mPqR",
permission: "users:write",
organizationId: "org_4tL3nWqX",
});
// { allowed: true }