aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/plugins.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts
index 064af9ead..e0a6f98a7 100644
--- a/server/helpers/custom-validators/plugins.ts
+++ b/server/helpers/custom-validators/plugins.ts
@@ -4,7 +4,6 @@ import { PluginType } from '../../../shared/models/plugins/plugin.type'
4import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 4import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
5import { PluginPackageJson } from '../../../shared/models/plugins/plugin-package-json.model' 5import { PluginPackageJson } from '../../../shared/models/plugins/plugin-package-json.model'
6import { isUrlValid } from './activitypub/misc' 6import { isUrlValid } from './activitypub/misc'
7import { isThemeRegistered } from '../../lib/plugins/theme-utils'
8 7
9const PLUGINS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.PLUGINS 8const PLUGINS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.PLUGINS
10 9
@@ -66,8 +65,8 @@ function isCSSPathsValid (css: any[]) {
66 return isArray(css) && css.every(c => isSafePath(c)) 65 return isArray(css) && css.every(c => isSafePath(c))
67} 66}
68 67
69function isThemeValid (name: string) { 68function isThemeNameValid (name: string) {
70 return isPluginNameValid(name) && isThemeRegistered(name) 69 return isPluginNameValid(name)
71} 70}
72 71
73function isPackageJSONValid (packageJSON: PluginPackageJson, pluginType: PluginType) { 72function isPackageJSONValid (packageJSON: PluginPackageJson, pluginType: PluginType) {
@@ -91,7 +90,7 @@ function isLibraryCodeValid (library: any) {
91export { 90export {
92 isPluginTypeValid, 91 isPluginTypeValid,
93 isPackageJSONValid, 92 isPackageJSONValid,
94 isThemeValid, 93 isThemeNameValid,
95 isPluginHomepage, 94 isPluginHomepage,
96 isPluginVersionValid, 95 isPluginVersionValid,
97 isPluginNameValid, 96 isPluginNameValid,