Skip to content

Commit

Permalink
Extract system permission prefix to a separate type
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraBeatris committed Dec 19, 2024
1 parent f46dfbf commit 35f121e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/types/src/organizationMembership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ export type OrganizationCustomRoleKey = ClerkAuthorization extends Placeholder
: Base['role']
: Base['role'];

export type OrganizationSystemPermissionPrefix = 'org:sys_';

export type OrganizationSystemPermissionKey =
| 'org:sys_domains:manage'
| 'org:sys_profile:manage'
| 'org:sys_profile:delete'
| 'org:sys_memberships:read'
| 'org:sys_memberships:manage'
| 'org:sys_domains:read';
| `${OrganizationSystemPermissionPrefix}domains:manage`
| `${OrganizationSystemPermissionPrefix}profile:manage`
| `${OrganizationSystemPermissionPrefix}profile:delete`
| `${OrganizationSystemPermissionPrefix}memberships:read`
| `${OrganizationSystemPermissionPrefix}memberships:manage`
| `${OrganizationSystemPermissionPrefix}domains:read`;

/**
* OrganizationPermissionKey is a combination of system and custom permissions.
Expand Down

0 comments on commit 35f121e

Please sign in to comment.