mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix admin edition disabling feature
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user