From 4ec35c8792af441bd3d89ead054e880673642c72 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Thu, 26 Sep 2024 15:16:11 -0700 Subject: [PATCH] Only include installed extensions (#229889) Fixes https://github.com/microsoft/vscode/issues/229886 --- .../actions/manageTrustedExtensionsForAccountAction.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/authentication/browser/actions/manageTrustedExtensionsForAccountAction.ts b/src/vs/workbench/contrib/authentication/browser/actions/manageTrustedExtensionsForAccountAction.ts index be2850dd9f8..1af0e19ab54 100644 --- a/src/vs/workbench/contrib/authentication/browser/actions/manageTrustedExtensionsForAccountAction.ts +++ b/src/vs/workbench/contrib/authentication/browser/actions/manageTrustedExtensionsForAccountAction.ts @@ -107,7 +107,12 @@ class ManageTrustedExtensionsForAccountActionImpl { } private async _getItems(providerId: string, accountLabel: string) { - const allowedExtensions = this._authenticationAccessService.readAllowedExtensions(providerId, accountLabel); + let allowedExtensions = this._authenticationAccessService.readAllowedExtensions(providerId, accountLabel); + // only include extensions that are installed + const resolvedExtensions = await Promise.all(allowedExtensions.map(ext => this._extensionService.getExtension(ext.id))); + allowedExtensions = resolvedExtensions + .map((ext, i) => ext ? allowedExtensions[i] : undefined) + .filter(ext => !!ext); const trustedExtensionAuthAccess = this._productService.trustedExtensionAuthAccess; const trustedExtensionIds = // Case 1: trustedExtensionAuthAccess is an array