mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-09 07:14:52 +02:00
Update:Express middleware sets req.user to new data model, openid permissions functions moved to new data model
This commit is contained in:
@ -113,8 +113,8 @@ class BackupController {
|
||||
}
|
||||
|
||||
middleware(req, res, next) {
|
||||
if (!req.userNew.isAdminOrUp) {
|
||||
Logger.error(`[BackupController] Non-admin user "${req.userNew.username}" attempting to access backups`)
|
||||
if (!req.user.isAdminOrUp) {
|
||||
Logger.error(`[BackupController] Non-admin user "${req.user.username}" attempting to access backups`)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user