Commit 1b6388c
authored
fix: IDE launch fails when opening a URI targeting a workspace owned … (#324)
…by a different user
When a Coder URI pointed to a workspace owned by a user other than the
one currently authenticated, the IDE would fail to launch with a
misleading error claiming no matching IDE version was available. The
real problem was that the workspace poller only fetched the
authenticated user's own workspaces, so the target workspace never made
it into the plugin's environment registry. When the IDE launch tried to
inspect that workspace, Toolbox reported it as non-existent, which
cascaded into empty IDE lists and the confusing version mismatch error.
The fix intercepts URI handling — for both the same-deployment and
new-deployment flows, and regardless of whether token, mTLS, or OAuth2
authentication is in use — and scopes the workspace filter to owner:<x>
name:<y> before the protocol handler runs.
This ensures the poller fetches exactly the target workspace and
registers it with Toolbox in time for the IDE launch to succeed.
When the URI targets the authenticated user's own workspace, the filter
is reset to the default owner:me instead, which also cleans up any
leftover non-owned filter from a previous URI.
- resolves DEVEX-372
- resolves DEVEX-3741 parent e014646 commit 1b6388c
3 files changed
Lines changed: 39 additions & 7 deletions
File tree
- src/main/kotlin/com/coder/toolbox
- util
- views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
385 | 387 | | |
386 | 388 | | |
387 | 389 | | |
388 | | - | |
| 390 | + | |
389 | 391 | | |
390 | 392 | | |
391 | 393 | | |
| |||
662 | 664 | | |
663 | 665 | | |
664 | 666 | | |
665 | | - | |
666 | | - | |
667 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
668 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
669 | 689 | | |
670 | 690 | | |
671 | 691 | | |
672 | 692 | | |
673 | 693 | | |
674 | 694 | | |
675 | 695 | | |
676 | | - | |
| 696 | + | |
677 | 697 | | |
678 | 698 | | |
679 | 699 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
180 | 191 | | |
181 | 192 | | |
182 | 193 | | |
| |||
0 commit comments