Commit 39f42bc
authored
feat: show dialog with a redirect if permissions are required (coder#16661)
Closes [this
issue](coder/internal#385 (comment))
## New behavior
When a user ends up on a page they don't have permission to view instead
of being redirected back to _/workspaces_ they'll be met with the
un-closeable dialog below with a link to _/workspaces_.
This is similar to [this PR](coder#16644)
but IMO we should be making sure we are using `<RequirePermissions />`
wherever applicable and only relying on `<ErrorAlert />` as a fallback
in case there is some page we missed or endpoint we're accidentally
using.
1 parent ce49ce4 commit 39f42bc
1 file changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | | - | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
| |||
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
17 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
18 | 43 | | |
19 | 44 | | |
20 | 45 | | |
| |||
0 commit comments