- Notifications
You must be signed in to change notification settings - Fork1.1k
Commitf44969b
authored
chore: reorder prebuilt workspace authorization logic (#18506)
## DescriptionFollow-up from PR#18333Related with:#18333 (comment)This changes the authorization logic to first try the normal workspaceauthorization check, and only if the resource is a prebuilt workspace,fall back to the prebuilt workspace authorization check. Since prebuiltworkspaces are a subset of workspaces, the normal workspace check ismore likely to succeed. This is a small optimization to reduceunnecessary prebuilt authorization calls.1 parent341b54e commitf44969b
File tree
5 files changed
+55
-29
lines changed- coderd
- database
- dbauthz
- wsbuilder
5 files changed
+55
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | | - | |
162 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
163 | 167 | | |
164 | | - | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
| 172 | + | |
168 | 173 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5650 | 5650 | | |
5651 | 5651 | | |
5652 | 5652 | | |
5653 | | - | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
| 5661 | + | |
| 5662 | + | |
| 5663 | + | |
5654 | 5664 | | |
5655 | 5665 | | |
5656 | 5666 | | |
| |||
5679 | 5689 | | |
5680 | 5690 | | |
5681 | 5691 | | |
5682 | | - | |
| 5692 | + | |
| 5693 | + | |
| 5694 | + | |
| 5695 | + | |
| 5696 | + | |
| 5697 | + | |
| 5698 | + | |
| 5699 | + | |
| 5700 | + | |
| 5701 | + | |
| 5702 | + | |
5683 | 5703 | | |
5684 | 5704 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
202 | 209 | | |
203 | 210 | | |
204 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
394 | 397 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
| 403 | + | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1052 | 1055 | | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
| 1056 | + | |
| 1057 | + | |
1060 | 1058 | | |
1061 | 1059 | | |
1062 | 1060 | | |
| |||
0 commit comments
Comments
(0)