(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
This commit is contained in:
Jarosław Sadziński 2021-08-09 15:14:03 +02:00
parent 0b11960fe7
commit 5b92a43849

View File

@ -176,6 +176,7 @@ function addMenu(home: HomeModel, creating: Observable<boolean>): DomElementArg[
menuItem(() => importFromPluginAndOpen(home, source),
menuIcon('Import'),
source.importSource.label,
dom.cls('disabled', !home.newDocWorkspace.get()),
testId(`dm-import-plugin`)
))
])),