Change few default settings for adsweb (#17029)

* device auth,notebook default settings for adsweb

* Addressed comment

Co-authored-by: hhh <gfhg>
This commit is contained in:
Monica Gupta
2021-09-13 10:23:07 -07:00
committed by GitHub
parent 08eee69bbc
commit ed9e0a6575
2 changed files with 13 additions and 0 deletions

View File

@@ -81,6 +81,13 @@ export async function activate(context: vscode.ExtensionContext): Promise<azurec
if (!storagePath) {
return undefined;
}
// TODO: Since Code Grant auth doesnt work in web mode, enabling Device code auth by default for web mode. We can remove this once we have that working in web mode.
const config = vscode.workspace.getConfiguration('accounts.azure.auth');
if (vscode.env.uiKind === vscode.UIKind.Web) {
await config.update('deviceCode', true, vscode.ConfigurationTarget.Global);
}
updatePiiLoggingLevel();
// Create the provider service and activate

View File

@@ -30,6 +30,12 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
IconPathHelper.setExtensionContext(extensionContext);
const appContext = new AppContext(extensionContext);
// TODO: Notebook doesn't work without root setting enabled in web mode. Once we start using non-root containers, we can remove this code.
const config = vscode.workspace.getConfiguration('notebook');
if (vscode.env.uiKind === vscode.UIKind.Web) {
await config.update('allowRoot', true, vscode.ConfigurationTarget.Global);
}
/**
* ***** IMPORTANT *****
* If changes are made to bookTreeView.openBook, please ensure backwards compatibility with its current state.