From 35183efe58ffebee3ac2ff6515077fac1c3612e1 Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Mon, 30 Sep 2024 14:38:38 -0700 Subject: [PATCH] Revert "Rename MSAL setting" (#230164) Revert "Rename MSAL setting (#230142)" This reverts commit 2a677c686b929195003cb632c6937ca11d880d36. --- extensions/microsoft-authentication/package.json | 2 +- extensions/microsoft-authentication/src/extension.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/microsoft-authentication/package.json b/extensions/microsoft-authentication/package.json index dbf4bbe969e..15acb5db286 100644 --- a/extensions/microsoft-authentication/package.json +++ b/extensions/microsoft-authentication/package.json @@ -99,7 +99,7 @@ { "title": "Microsoft", "properties": { - "microsoft.preview.useMsalBasedAuthentication": { + "microsoft.useMsal": { "type": "boolean", "description": "%useMsal.description%" } diff --git a/extensions/microsoft-authentication/src/extension.ts b/extensions/microsoft-authentication/src/extension.ts index e2917e7e8a3..3f9b5d3a4d1 100644 --- a/extensions/microsoft-authentication/src/extension.ts +++ b/extensions/microsoft-authentication/src/extension.ts @@ -13,7 +13,7 @@ import Logger from './logger'; function shouldUseMsal(expService: IExperimentationService): boolean { // First check if there is a setting value to allow user to override the default - const inspect = workspace.getConfiguration('microsoft').inspect('preview.useMsalBasedAuthentication'); + const inspect = workspace.getConfiguration('microsoft').inspect('useMsal'); if (inspect?.workspaceFolderValue !== undefined) { Logger.debug(`Acquired MSAL enablement value from 'workspaceFolderValue'. Value: ${inspect.workspaceFolderValue}`); return inspect.workspaceFolderValue; @@ -28,7 +28,7 @@ function shouldUseMsal(expService: IExperimentationService): boolean { } // Then check if the experiment value - const expValue = expService.getTreatmentVariable('vscode', 'microsoft.preview.useMsalBasedAuthentication'); + const expValue = expService.getTreatmentVariable('vscode', 'microsoft.useMsal'); if (expValue !== undefined) { Logger.debug(`Acquired MSAL enablement value from 'exp'. Value: ${expValue}`); return expValue; @@ -50,7 +50,7 @@ export async function activate(context: ExtensionContext) { useMsal = shouldUseMsal(expService); context.subscriptions.push(workspace.onDidChangeConfiguration(async e => { - if (!e.affectsConfiguration('microsoft.preview.useMsalBasedAuthentication') || useMsal === shouldUseMsal(expService)) { + if (!e.affectsConfiguration('microsoft.useMsal') || useMsal === shouldUseMsal(expService)) { return; }