Commit fe15b66
committed
refactor(webapp): render permission-denied via an error boundary
Add throwPermissionDenied + a PermissionDeniedBoundary so a gated loader can
just throw, and the route's error boundary renders the panel (falling back to
the normal error display otherwise). Switch the integrations page to this:
the loader throws when the role can't manage integrations and the page
component only renders for allowed users, dropping the flag-and-split
boilerplate.1 parent cc6a021 commit fe15b66
2 files changed
Lines changed: 49 additions & 35 deletions
File tree
- apps/webapp/app
- components
- routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings.integrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
| 7 | + | |
| 8 | + | |
2 | 9 | | |
3 | 10 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
Lines changed: 7 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
11 | 6 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 7 | + | |
| 8 | + | |
17 | 9 | | |
18 | 10 | | |
19 | 11 | | |
| |||
71 | 63 | | |
72 | 64 | | |
73 | 65 | | |
74 | | - | |
| 66 | + | |
75 | 67 | | |
76 | 68 | | |
77 | 69 | | |
| |||
107 | 99 | | |
108 | 100 | | |
109 | 101 | | |
110 | | - | |
111 | 102 | | |
112 | 103 | | |
113 | 104 | | |
| |||
213 | 204 | | |
214 | 205 | | |
215 | 206 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 207 | + | |
220 | 208 | | |
221 | 209 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 210 | + | |
| 211 | + | |
237 | 212 | | |
238 | 213 | | |
239 | 214 | | |
| |||
0 commit comments