aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/config.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts
index 5f1ac89bc..f0385ab44 100644
--- a/server/middlewares/validators/config.ts
+++ b/server/middlewares/validators/config.ts
@@ -106,12 +106,13 @@ const customConfigUpdateValidator = [
106] 106]
107 107
108function ensureConfigIsEditable (req: express.Request, res: express.Response, next: express.NextFunction) { 108function ensureConfigIsEditable (req: express.Request, res: express.Response, next: express.NextFunction) {
109 if (!CONFIG.WEBADMIN.CONFIGURATION.EDITS.ALLOWED) { 109 if (!CONFIG.WEBADMIN.CONFIGURATION.EDITION.ALLOWED) {
110 return res.fail({ 110 return res.fail({
111 status: HttpStatusCode.METHOD_NOT_ALLOWED_405, 111 status: HttpStatusCode.METHOD_NOT_ALLOWED_405,
112 message: 'Server configuration is static and cannot be edited' 112 message: 'Server configuration is static and cannot be edited'
113 }) 113 })
114 } 114 }
115
115 return next() 116 return next()
116} 117}
117 118