- Notifications
You must be signed in to change notification settings - Fork1.1k
Commit4c33846
chore: add prebuilds system user (#16916)
Pre-requisite for#16891Closescoder/internal#515This PR introduces a new concept of a "system" user.Our data model requires that all workspaces have an owner (a `users`relation), and prebuilds is a feature that will spin up workspaces to beclaimed later by actual users - and thus needs to own the workspaces inthe interim.Naturally, introducing a change like this touches a few aspects aroundthe codebase and we've taken the approach _default hidden_ here; inother words, queries for users will by default _exclude_ all systemusers, but there is a flag to ensure they can be displayed. This keepsthe changeset relatively small.This user has minimal permissions (it's equivalent to a `member` sinceit has no roles). It will be associated with the default org in theinitial migration, and thereafter we'll need to somehow ensure itsmembership aligns with templates (which are org-scoped) for which it'llneed to provision prebuilds; that's a solution we'll have in asubsequent PR.---------Signed-off-by: Danny Kopping <dannykopping@gmail.com>Co-authored-by: Sas Swart <sas.swart.cdk@gmail.com>1 parent117e4c2 commit4c33846
File tree
38 files changed
+591
-143
lines changed- cli
- coderd
- database
- dbauthz
- dbgen
- dbmem
- dbmetrics
- dbmock
- migrations
- queries
- httpmw
- idpsync
- prebuilds
- telemetry
- docs/admin/security
- enterprise
- audit
- coderd
- license
- dbcrypt
38 files changed
+591
-143
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1894 | 1894 | | |
1895 | 1895 | | |
1896 | 1896 | | |
1897 | | - | |
| 1897 | + | |
1898 | 1898 | | |
1899 | 1899 | | |
1900 | 1900 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | | - | |
| 1066 | + | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | | - | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1320 | 1324 | | |
1321 | 1325 | | |
1322 | 1326 | | |
| |||
1502 | 1506 | | |
1503 | 1507 | | |
1504 | 1508 | | |
1505 | | - | |
| 1509 | + | |
1506 | 1510 | | |
1507 | 1511 | | |
1508 | 1512 | | |
1509 | | - | |
| 1513 | + | |
1510 | 1514 | | |
1511 | 1515 | | |
1512 | 1516 | | |
| |||
1737 | 1741 | | |
1738 | 1742 | | |
1739 | 1743 | | |
1740 | | - | |
| 1744 | + | |
1741 | 1745 | | |
1742 | 1746 | | |
1743 | 1747 | | |
1744 | | - | |
| 1748 | + | |
1745 | 1749 | | |
1746 | 1750 | | |
1747 | | - | |
1748 | | - | |
| 1751 | + | |
| 1752 | + | |
1749 | 1753 | | |
1750 | 1754 | | |
1751 | | - | |
1752 | | - | |
| 1755 | + | |
| 1756 | + | |
1753 | 1757 | | |
1754 | 1758 | | |
1755 | | - | |
| 1759 | + | |
1756 | 1760 | | |
1757 | 1761 | | |
1758 | 1762 | | |
| |||
2530 | 2534 | | |
2531 | 2535 | | |
2532 | 2536 | | |
2533 | | - | |
| 2537 | + | |
2534 | 2538 | | |
2535 | 2539 | | |
2536 | 2540 | | |
2537 | | - | |
| 2541 | + | |
2538 | 2542 | | |
2539 | 2543 | | |
2540 | 2544 | | |
| |||
3778 | 3782 | | |
3779 | 3783 | | |
3780 | 3784 | | |
| 3785 | + | |
3781 | 3786 | | |
3782 | 3787 | | |
3783 | 3788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
391 | 394 | | |
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
395 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
401 | 407 | | |
402 | | - | |
| 408 | + | |
403 | 409 | | |
404 | 410 | | |
405 | 411 | | |
| |||
1681 | 1687 | | |
1682 | 1688 | | |
1683 | 1689 | | |
1684 | | - | |
| 1690 | + | |
1685 | 1691 | | |
1686 | 1692 | | |
1687 | 1693 | | |
| |||
3696 | 3702 | | |
3697 | 3703 | | |
3698 | 3704 | | |
3699 | | - | |
| 3705 | + | |
3700 | 3706 | | |
3701 | 3707 | | |
3702 | 3708 | | |
| |||
3739 | 3745 | | |
3740 | 3746 | | |
3741 | 3747 | | |
3742 | | - | |
| 3748 | + | |
3743 | 3749 | | |
3744 | 3750 | | |
3745 | 3751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
157 | 174 | | |
158 | 175 | | |
159 | 176 | | |
| |||
442 | 459 | | |
443 | 460 | | |
444 | 461 | | |
| 462 | + | |
445 | 463 | | |
446 | 464 | | |
447 | 465 | | |
| |||
1554 | 1572 | | |
1555 | 1573 | | |
1556 | 1574 | | |
1557 | | - | |
| 1575 | + | |
| 1576 | + | |
1558 | 1577 | | |
1559 | 1578 | | |
1560 | 1579 | | |
1561 | 1580 | | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
1562 | 1585 | | |
1563 | 1586 | | |
1564 | 1587 | | |
| |||
2649 | 2672 | | |
2650 | 2673 | | |
2651 | 2674 | | |
2652 | | - | |
| 2675 | + | |
| 2676 | + | |
2653 | 2677 | | |
2654 | 2678 | | |
2655 | 2679 | | |
2656 | 2680 | | |
2657 | 2681 | | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
2658 | 2686 | | |
2659 | 2687 | | |
2660 | 2688 | | |
| |||
3390 | 3418 | | |
3391 | 3419 | | |
3392 | 3420 | | |
3393 | | - | |
| 3421 | + | |
| 3422 | + | |
3394 | 3423 | | |
3395 | 3424 | | |
3396 | 3425 | | |
3397 | 3426 | | |
3398 | 3427 | | |
3399 | 3428 | | |
3400 | 3429 | | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
3401 | 3433 | | |
3402 | 3434 | | |
3403 | 3435 | | |
| |||
3420 | 3452 | | |
3421 | 3453 | | |
3422 | 3454 | | |
3423 | | - | |
| 3455 | + | |
3424 | 3456 | | |
3425 | 3457 | | |
3426 | 3458 | | |
3427 | | - | |
3428 | | - | |
| 3459 | + | |
| 3460 | + | |
3429 | 3461 | | |
3430 | 3462 | | |
3431 | 3463 | | |
3432 | 3464 | | |
3433 | | - | |
| 3465 | + | |
3434 | 3466 | | |
3435 | 3467 | | |
3436 | 3468 | | |
| |||
3445 | 3477 | | |
3446 | 3478 | | |
3447 | 3479 | | |
3448 | | - | |
3449 | | - | |
| 3480 | + | |
| 3481 | + | |
3450 | 3482 | | |
3451 | 3483 | | |
3452 | 3484 | | |
| |||
6223 | 6255 | | |
6224 | 6256 | | |
6225 | 6257 | | |
6226 | | - | |
| 6258 | + | |
| 6259 | + | |
6227 | 6260 | | |
6228 | 6261 | | |
6229 | 6262 | | |
6230 | 6263 | | |
6231 | 6264 | | |
| 6265 | + | |
| 6266 | + | |
| 6267 | + | |
6232 | 6268 | | |
6233 | 6269 | | |
6234 | 6270 | | |
| |||
6580 | 6616 | | |
6581 | 6617 | | |
6582 | 6618 | | |
| 6619 | + | |
| 6620 | + | |
| 6621 | + | |
| 6622 | + | |
| 6623 | + | |
| 6624 | + | |
6583 | 6625 | | |
6584 | 6626 | | |
6585 | 6627 | | |
| |||
8933 | 8975 | | |
8934 | 8976 | | |
8935 | 8977 | | |
| 8978 | + | |
8936 | 8979 | | |
8937 | 8980 | | |
8938 | 8981 | | |
| |||
10091 | 10134 | | |
10092 | 10135 | | |
10093 | 10136 | | |
10094 | | - | |
| 10137 | + | |
10095 | 10138 | | |
10096 | 10139 | | |
10097 | 10140 | | |
| |||
0 commit comments
Comments
(0)