Revert "Rename MSAL setting" (#230164)

Revert "Rename MSAL setting (#230142)"

This reverts commit 2a677c686b.
This commit is contained in:
Tyler James Leonhardt
2024-09-30 14:38:38 -07:00
committed by GitHub
parent 51fa4d0172
commit 35183efe58
2 changed files with 4 additions and 4 deletions

View File

@@ -99,7 +99,7 @@
{
"title": "Microsoft",
"properties": {
"microsoft.preview.useMsalBasedAuthentication": {
"microsoft.useMsal": {
"type": "boolean",
"description": "%useMsal.description%"
}

View File

@@ -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<boolean>('preview.useMsalBasedAuthentication');
const inspect = workspace.getConfiguration('microsoft').inspect<boolean>('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<boolean>('vscode', 'microsoft.preview.useMsalBasedAuthentication');
const expValue = expService.getTreatmentVariable<boolean>('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;
}