]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/config.ts
Fix admin edition disabling feature
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / config.ts
index 5f1ac89bc909021ff6302d7243c2bf5d5ed723ef..f0385ab44bd9dfc24e1897d1079215c0a0ab8eed 100644 (file)
@@ -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()
 }