From dea5896edeab3c2d7402a940d78c60fc4d84778c Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Sat, 11 Jul 2020 20:36:27 -0700 Subject: [PATCH] Disable AddCellLine if notebook is untrusted --- src/datascience-ui/native-editor/addCellLine.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/datascience-ui/native-editor/addCellLine.tsx b/src/datascience-ui/native-editor/addCellLine.tsx index 8f275cc072ce..f5513aafecc9 100644 --- a/src/datascience-ui/native-editor/addCellLine.tsx +++ b/src/datascience-ui/native-editor/addCellLine.tsx @@ -25,19 +25,23 @@ export class AddCellLine extends React.Component { const plus = this.props.includePlus ? ( ) : null; + const disabled = !this.props.isNotebookTrusted; + const innerFilter = disabled ? 'image-button-inner-disabled-filter' : ''; return (
);