1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Fix admin edition disabling feature

This commit is contained in:
Chocobozzz 2021-10-14 11:35:43 +02:00
parent e1a570abff
commit cf0c8ee588
No known key found for this signature in database
GPG key ID: 583A612D890159BE
14 changed files with 61 additions and 20 deletions

View 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()
}