mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-05 18:54:39 +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
|
@ -13,8 +13,8 @@ class FileSystemController {
|
|||
* @param {import('express').Response} res
|
||||
*/
|
||||
async getPaths(req, res) {
|
||||
if (!req.userNew.isAdminOrUp) {
|
||||
Logger.error(`[FileSystemController] Non-admin user "${req.userNew.username}" attempting to get filesystem paths`)
|
||||
if (!req.user.isAdminOrUp) {
|
||||
Logger.error(`[FileSystemController] Non-admin user "${req.user.username}" attempting to get filesystem paths`)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
|
@ -69,8 +69,8 @@ class FileSystemController {
|
|||
|
||||
// POST: api/filesystem/pathexists
|
||||
async checkPathExists(req, res) {
|
||||
if (!req.userNew.canUpload) {
|
||||
Logger.error(`[FileSystemController] Non-admin user "${req.userNew.username}" attempting to check path exists`)
|
||||
if (!req.user.canUpload) {
|
||||
Logger.error(`[FileSystemController] Non-admin user "${req.user.username}" attempting to check path exists`)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue