mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-23 17:29:19 +02:00
Update more API endpoints to use new user model
This commit is contained in:
parent
9facf77ff1
commit
afc16358ca
23 changed files with 856 additions and 404 deletions
|
@ -337,7 +337,7 @@ class CollectionController {
|
|||
if (req.method == 'DELETE' && !req.userNew.canDelete) {
|
||||
Logger.warn(`[CollectionController] User "${req.userNew.username}" attempted to delete without permission`)
|
||||
return res.sendStatus(403)
|
||||
} else if ((req.method == 'PATCH' || req.method == 'POST') && !req.user.canUpdate) {
|
||||
} else if ((req.method == 'PATCH' || req.method == 'POST') && !req.userNew.canUpdate) {
|
||||
Logger.warn(`[CollectionController] User "${req.userNew.username}" attempted to update without permission`)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue