mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-04 02:22:09 +01: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