Force enable notebooks

This commit is contained in:
Steve Faulkner 2021-04-08 21:55:48 -05:00
parent f060d4b1b8
commit 2a5ccbb51b
2 changed files with 3 additions and 11 deletions

View File

@ -300,11 +300,7 @@ export default class Explorer {
);
Promise.all([this._refreshNotebooksEnabledStateForAccount(), this._refreshSparkEnabledStateForAccount()]).then(
async () => {
this.isNotebookEnabled(
userContext.authType !== AuthType.ResourceToken &&
((await this._containsDefaultNotebookWorkspace(this.databaseAccount())) ||
userContext.features.enableNotebooks)
);
this.isNotebookEnabled(false);
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
isNotebookEnabled: this.isNotebookEnabled(),
@ -1810,11 +1806,7 @@ export default class Explorer {
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
const authType = userContext.authType;
if (
authType === AuthType.EncryptedToken ||
authType === AuthType.ResourceToken ||
authType === AuthType.MasterKey
) {
if (true) {
this.isNotebooksEnabledForAccount(false);
return;
}

View File

@ -456,7 +456,7 @@ function createEnableNotebooksButton(container: Explorer): CommandButtonComponen
onCommandClick: () => container.setupNotebooksPane.openWithTitleAndDescription(label, description),
commandButtonLabel: label,
hasPopup: false,
disabled: !container.isNotebooksEnabledForAccount(),
disabled: false,
ariaLabel: label,
tooltipText: container.isNotebooksEnabledForAccount() ? "" : tooltip,
};