Skip to content

Commit ef96302

Browse files
authored
fix(paidtier): don't show "Manage Subscription" for IdC user #7467
Problem: "Manage Subscription" menu item shows for IdC users, but the Q service call does not currently support IdC users. Solution: Only show the menu item for BuilderId users.
1 parent 450c28a commit ef96302

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/core/src/codewhisperer/ui/statusBarMenu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function getQuickPickItems(): DataQuickPickItem<string>[] {
107107
createSettingsNode(),
108108
...(isUsingEnterpriseSso && regionProfile ? [createSelectRegionProfileNode(regionProfile)] : []),
109109
...(AuthUtil.instance.isConnected() && !hasVendedIamCredentials() && !hasVendedCredentialsFromMetadata()
110-
? [createManageSubscription(), createSignout()]
110+
? [...(AuthUtil.instance.isBuilderIdInUse() ? [createManageSubscription()] : []), createSignout()]
111111
: []),
112112
]
113113

packages/core/src/test/codewhisperer/commands/basicCommands.test.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,7 @@ describe('CodeWhisperer-basicCommands', function () {
446446
sinon.stub(AuthUtil.instance, 'isConnected').returns(true)
447447

448448
getTestWindow().onDidShowQuickPick((e) => {
449-
e.assertContainsItems(
450-
createReconnect(),
451-
createLearnMore(),
452-
...genericItems(),
453-
createManageSubscription(),
454-
createSignout()
455-
)
449+
e.assertContainsItems(createReconnect(), createLearnMore(), ...genericItems(), createSignout())
456450
e.dispose() // skip needing to select an item to continue
457451
})
458452

@@ -472,7 +466,6 @@ describe('CodeWhisperer-basicCommands', function () {
472466
switchToAmazonQNode(),
473467
...genericItems(),
474468
createSettingsNode(),
475-
createManageSubscription(),
476469
createSignout()
477470
)
478471
e.dispose() // skip needing to select an item to continue
@@ -497,7 +490,6 @@ describe('CodeWhisperer-basicCommands', function () {
497490
switchToAmazonQNode(),
498491
...genericItems(),
499492
createSettingsNode(),
500-
createManageSubscription(),
501493
createSignout()
502494
)
503495
e.dispose() // skip needing to select an item to continue

0 commit comments

Comments
 (0)