From 7780d76eb6f840c40f1ef95b9fa45c4b47bb48a2 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 24 Oct 2019 17:31:53 +0200 Subject: [PATCH] Intiial work on 'Singing of Plugins and Material Packages'. Most of the work is in Uranium right now -- especially since the plugins part is picked up first, and there are already plugins at Uraniums level. part of CURA-6856 --- cura/ApplicationMetadata.py | 5 +++++ cura/CuraApplication.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/cura/ApplicationMetadata.py b/cura/ApplicationMetadata.py index daa937197c..25be4b31e9 100644 --- a/cura/ApplicationMetadata.py +++ b/cura/ApplicationMetadata.py @@ -42,6 +42,11 @@ try: except ImportError: CuraDebugMode = DEFAULT_CURA_DEBUG_MODE +try: + from cura.CuraVersion import CuraIsEnterpriseVersion # type: ignore +except ImportError: + CuraIsEnterpriseVersion = True # (DEFAULT_CURA_BUILD_TYPE != "") + # Each release has a fixed SDK version coupled with it. It doesn't make sense to make it configurable because, for # example Cura 3.2 with SDK version 6.1 will not work. So the SDK version is hard-coded here and left out of the # CuraVersion.py.in template. diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 8caccc786e..9c2fd1b931 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -719,6 +719,8 @@ class CuraApplication(QtApplication): ## Handle loading of all plugin types (and the backend explicitly) # \sa PluginRegistry def _loadPlugins(self) -> None: + self._plugin_registry.setCheckIfTrusted(ApplicationMetadata.CuraIsEnterpriseVersion) + self._plugin_registry.addType("profile_reader", self._addProfileReader) self._plugin_registry.addType("profile_writer", self._addProfileWriter)