Skip to content

Commit ceab9e7

Browse files
committed
fix(shared): Add org: prefix to org roles to match previous behavior
1 parent 7cc576a commit ceab9e7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/shared/src/__tests__/jwtPayloadParser.test.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ describe('JWTPayloadToAuthObjectProperties', () => {
1818
v: 2,
1919
fea: 'o:impersonation',
2020
o: {
21-
id: 'org_id',
21+
id: 'org_xxxxxxx',
2222
rol: 'admin',
23-
slg: 'org_slug',
23+
slg: '/test',
2424
per: 'read,manage',
2525
fpm: '3',
2626
},
2727
});
2828

2929
const { sessionClaims: v1Claims, ...signedInAuthObjectV1 } = JWTPayloadToAuthObjectProperties({
3030
...baseClaims,
31-
org_id: 'org_id',
32-
org_role: 'admin',
33-
org_slug: 'org_slug',
31+
org_id: 'org_xxxxxxx',
32+
org_role: 'org:admin',
33+
org_slug: '/test',
3434
org_permissions: ['org:impersonation:read', 'org:impersonation:manage'],
3535
});
3636
expect(signedInAuthObjectV1).toEqual(signedInAuthObjectV2);
@@ -42,9 +42,9 @@ describe('JWTPayloadToAuthObjectProperties', () => {
4242
v: 2,
4343
fea: 'o:impersonation,o:memberships',
4444
o: {
45-
id: 'org_id',
45+
id: 'org_xxxxxxx',
4646
rol: 'admin',
47-
slg: 'org_slug',
47+
slg: '/test',
4848
per: 'read,manage',
4949
fpm: '2,3',
5050
},

0 commit comments

Comments
 (0)