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:
parent
e1a570abff
commit
cf0c8ee588
14 changed files with 61 additions and 20 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue