aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/plugins.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/plugins.ts')
-rw-r--r--server/controllers/api/plugins.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/controllers/api/plugins.ts b/server/controllers/api/plugins.ts
index b64062287..1e6a02c49 100644
--- a/server/controllers/api/plugins.ts
+++ b/server/controllers/api/plugins.ts
@@ -8,6 +8,7 @@ import {
8 authenticate, 8 authenticate,
9 availablePluginsSortValidator, 9 availablePluginsSortValidator,
10 ensureUserHasRight, 10 ensureUserHasRight,
11 openapiOperationDoc,
11 paginationValidator, 12 paginationValidator,
12 pluginsSortValidator, 13 pluginsSortValidator,
13 setDefaultPagination, 14 setDefaultPagination,
@@ -35,6 +36,7 @@ import {
35const pluginRouter = express.Router() 36const pluginRouter = express.Router()
36 37
37pluginRouter.get('/available', 38pluginRouter.get('/available',
39 openapiOperationDoc({ operationId: 'getAvailablePlugins' }),
38 authenticate, 40 authenticate,
39 ensureUserHasRight(UserRight.MANAGE_PLUGINS), 41 ensureUserHasRight(UserRight.MANAGE_PLUGINS),
40 listAvailablePluginsValidator, 42 listAvailablePluginsValidator,
@@ -46,6 +48,7 @@ pluginRouter.get('/available',
46) 48)
47 49
48pluginRouter.get('/', 50pluginRouter.get('/',
51 openapiOperationDoc({ operationId: 'getPlugins' }),
49 authenticate, 52 authenticate,
50 ensureUserHasRight(UserRight.MANAGE_PLUGINS), 53 ensureUserHasRight(UserRight.MANAGE_PLUGINS),
51 listPluginsValidator, 54 listPluginsValidator,
@@ -84,6 +87,7 @@ pluginRouter.get('/:npmName',
84) 87)
85 88
86pluginRouter.post('/install', 89pluginRouter.post('/install',
90 openapiOperationDoc({ operationId: 'addPlugin' }),
87 authenticate, 91 authenticate,
88 ensureUserHasRight(UserRight.MANAGE_PLUGINS), 92 ensureUserHasRight(UserRight.MANAGE_PLUGINS),
89 installOrUpdatePluginValidator, 93 installOrUpdatePluginValidator,
@@ -91,6 +95,7 @@ pluginRouter.post('/install',
91) 95)
92 96
93pluginRouter.post('/update', 97pluginRouter.post('/update',
98 openapiOperationDoc({ operationId: 'updatePlugin' }),
94 authenticate, 99 authenticate,
95 ensureUserHasRight(UserRight.MANAGE_PLUGINS), 100 ensureUserHasRight(UserRight.MANAGE_PLUGINS),
96 installOrUpdatePluginValidator, 101 installOrUpdatePluginValidator,
@@ -98,6 +103,7 @@ pluginRouter.post('/update',
98) 103)
99 104
100pluginRouter.post('/uninstall', 105pluginRouter.post('/uninstall',
106 openapiOperationDoc({ operationId: 'uninstallPlugin' }),
101 authenticate, 107 authenticate,
102 ensureUserHasRight(UserRight.MANAGE_PLUGINS), 108 ensureUserHasRight(UserRight.MANAGE_PLUGINS),
103 uninstallPluginValidator, 109 uninstallPluginValidator,