1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop: Resolves #7934: Don't create an extra copy of default plugins (load directly from the app bundle) (#9508)

This commit is contained in:
Henry Heino
2023-12-22 03:31:57 -08:00
committed by GitHub
parent bf59b23efe
commit ee18271f9b
13 changed files with 242 additions and 258 deletions

View File

@@ -13,16 +13,11 @@ const validateUntrustedManifest = (manifest: any, existingManifests: any) => {
validatePluginId(manifest.id);
validatePluginVersion(manifest.version);
// This prevents a plugin author from marking their own plugin as _recommended
// or _built_in.
// This prevents a plugin author from marking their own plugin as _recommended.
if (typeof manifest._recommended !== 'undefined') {
throw new Error(`Plugin ${manifest.id} cannot mark itself as recommended.`);
}
if (typeof manifest._built_in !== 'undefined') {
throw new Error(`Plugin ${manifest.id} cannot mark itself as built-in.`);
}
checkIfPluginCanBeAdded(existingManifests, manifest);
};