Commit 2def22a
authored
amazonQ: only add missing scopes intentionally (aws#4152)
* amazonQ: only add missing scopes intentionally
Problem:
Before we would always add missing scopes whenever an
existing CW user was missing the new scopes for chat.
This would be done during the reauthentication process
automatically.
The issue is that we did not want this and only wanted
to add missing Amazon Q/chat scopes when the user intentionally
wanted them to be added.
Solution:
- Don't always add missing scopes during reauthenticate(). Instead
use an arg to determine if we should
- We will add missing scopes in the Chat "reauthenticate" prompt as well
as the Amazon Q node.
- Everywhere else will simply reauthenticate without adding new scopes
Signed-off-by: nkomonen <[email protected]>
* add type to signature
Signed-off-by: nkomonen <[email protected]>
* add check for invalid arg
There is a possibility that addMissingScopes is incorrectly set by vscode,
so check and set a default if necessary
Signed-off-by: nkomonen <[email protected]>
---------
Signed-off-by: nkomonen <[email protected]>1 parent 56a706d commit 2def22a
File tree
5 files changed
+39
-21
lines changed- src
- amazonq
- auth
- explorer
- codewhisperer
- commands
- util
- test/codewhisperer/util
5 files changed
+39
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
214 | | - | |
| 212 | + | |
215 | 213 | | |
216 | 214 | | |
217 | 215 | | |
| |||
304 | 302 | | |
305 | 303 | | |
306 | 304 | | |
307 | | - | |
| 305 | + | |
308 | 306 | | |
309 | 307 | | |
310 | 308 | | |
311 | 309 | | |
312 | 310 | | |
313 | 311 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
154 | 165 | | |
155 | 166 | | |
156 | 167 | | |
157 | 168 | | |
158 | | - | |
| 169 | + | |
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
163 | 174 | | |
164 | | - | |
| 175 | + | |
| 176 | + | |
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
| |||
0 commit comments