File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
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
+ ```
You can’t perform that action at this time.
0 commit comments