From 2c78537c9a9c34d177f93d56fe23192c87bbe50a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 20 Oct 2021 20:22:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Disallow=20guests=20from=20openi?= =?UTF-8?q?ng=20the=20notebook=20dialog=20(fix=20#78)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/notebook/NotebookCreateBox.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/components/notebook/NotebookCreateBox.tsx b/frontend/src/components/notebook/NotebookCreateBox.tsx index 5ee8c18..3c8c6c4 100644 --- a/frontend/src/components/notebook/NotebookCreateBox.tsx +++ b/frontend/src/components/notebook/NotebookCreateBox.tsx @@ -54,6 +54,12 @@ export function NotebookCreateBox({viewSet, resource}: NotebookCreateBoxProps): [viewSet, resource], ) + if(!authorization) { + return null + } + if(!authorization.state.token) { + return null + } if(resource) { if(resource.value.locked_by) { return null