diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-14 11:35:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-14 11:35:43 +0200 |
commit | cf0c8ee588e37809d85ec1deec1e4fdfa0f122a5 (patch) | |
tree | 1692868027592d2a300988643fdd96e5fdfe2091 /server/middlewares | |
parent | e1a570abff3ebf375433e58e7362d56bd32d4cd8 (diff) | |
download | PeerTube-cf0c8ee588e37809d85ec1deec1e4fdfa0f122a5.tar.gz PeerTube-cf0c8ee588e37809d85ec1deec1e4fdfa0f122a5.tar.zst PeerTube-cf0c8ee588e37809d85ec1deec1e4fdfa0f122a5.zip |
Fix admin edition disabling feature
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/validators/config.ts | 3 |
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 | ||
108 | function ensureConfigIsEditable (req: express.Request, res: express.Response, next: express.NextFunction) { | 108 | function 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 | ||