Skip to content

Commit

Permalink
Fix JSDocs for org_permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraBeatris committed Dec 19, 2024
1 parent 4fecdac commit f46dfbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/nextjs/src/server/__tests__/clerkMiddleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ describe('ClerkMiddleware type tests', () => {
clerkMiddlewareMock();
});

it('prevents usage of system permissions with auth.has()', () => {
clerkMiddlewareMock(async (auth, _event, _request) => {
// @ts-expect-error - system permissions are not allowed
(await auth()).has({ permission: 'org:sys_foo' });
});
});

describe('Multi domain', () => {
const defaultProps = { publishableKey: '', secretKey: '' };

Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/jwtv2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface JwtPayload extends CustomJwtSessionClaims {
org_role?: OrganizationCustomRoleKey;

/**
* Active organization role
* Active organization permissions
*/
org_permissions?: OrganizationCustomPermissionKey[];

Expand Down

0 comments on commit f46dfbf

Please sign in to comment.