Add Security Warning Bar for untrusted notebooks (#970)

* Add Security Warning Bar for untrusted notebooks

* Update

* Another update

* Add a snapshot test

* UX updates

* More updates

* Add tests

* Update test snapshot

* Update string

* Update security message
This commit is contained in:
Tanuj Mittal
2021-08-10 11:24:26 -07:00
committed by GitHub
parent 51f3f9a718
commit f8ac36962b
16 changed files with 306 additions and 13 deletions

View File

@@ -243,6 +243,11 @@ export function downloadItem(
const notebook = JSON.parse(response.data) as Notebook;
removeNotebookViewerLink(notebook, data.newCellId);
if (!data.isSample) {
const metadata = notebook.metadata as { [name: string]: unknown };
metadata.untrusted = true;
}
await container.importAndOpenContent(data.name, JSON.stringify(notebook));
logConsoleInfo(`Successfully downloaded ${name} to My Notebooks`);