From 5b92a438498128c082cd2627cf3b707474090660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Mon, 9 Aug 2021 15:14:03 +0200 Subject: [PATCH] (core) Disabling plugin import sources menu options when import is disabled Summary: Disabling import sources from add menu when a user is not allowed to import. Test Plan: browser tests Reviewers: paulfitz Reviewed By: paulfitz Subscribers: paulfitz Differential Revision: https://phab.getgrist.com/D2970 --- app/client/ui/HomeLeftPane.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/client/ui/HomeLeftPane.ts b/app/client/ui/HomeLeftPane.ts index 89087741..073e71cf 100644 --- a/app/client/ui/HomeLeftPane.ts +++ b/app/client/ui/HomeLeftPane.ts @@ -176,6 +176,7 @@ function addMenu(home: HomeModel, creating: Observable): DomElementArg[ menuItem(() => importFromPluginAndOpen(home, source), menuIcon('Import'), source.importSource.label, + dom.cls('disabled', !home.newDocWorkspace.get()), testId(`dm-import-plugin`) )) ])),