From cf0c8ee588e37809d85ec1deec1e4fdfa0f122a5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Oct 2021 11:35:43 +0200 Subject: Fix admin edition disabling feature --- server/middlewares/validators/config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/middlewares/validators') 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 = [ ] function ensureConfigIsEditable (req: express.Request, res: express.Response, next: express.NextFunction) { - if (!CONFIG.WEBADMIN.CONFIGURATION.EDITS.ALLOWED) { + if (!CONFIG.WEBADMIN.CONFIGURATION.EDITION.ALLOWED) { return res.fail({ status: HttpStatusCode.METHOD_NOT_ALLOWED_405, message: 'Server configuration is static and cannot be edited' }) } + return next() } -- cgit v1.2.3