Skip to content

Commit 4f6978d

Browse files
committed
chore(types,backend,clerk-react): Add changeset
1 parent f3c75c3 commit 4f6978d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.changeset/chatty-beds-doubt.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
'@clerk/backend': minor
4+
'@clerk/nextjs': minor
5+
'@clerk/shared': minor
6+
'@clerk/clerk-react': minor
7+
'@clerk/types': minor
8+
---
9+
10+
Support for permission checks with Gate.
11+
12+
Example usage:
13+
//index.d.ts
14+
```ts
15+
declare global {
16+
interface OrganizationCustomPermissions {
17+
"org:appointment:accept":"org:appointment:accept";
18+
"org:appointment:decline":"org:appointment:decline";
19+
"org:patients:create":"org:patients:create";
20+
}
21+
22+
interface OrganizationCustomPermissions {
23+
"org:doctor":"org:doctor";
24+
"org:nurse":"nurse";
25+
}
26+
}
27+
28+
```
29+
30+
31+
```tsx
32+
<Gate permission="org:appointment:accept">
33+
<button>Accept appointment</button>
34+
</Gate>
35+
```
36+
37+
```tsx
38+
<Gate role="org:doctor">
39+
<button>See patient's personal file</button>
40+
</Gate>
41+
```

0 commit comments

Comments
 (0)