mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-25 18:29:10 +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:
parent
29a15858f4
commit
2472b86284
29 changed files with 474 additions and 430 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue