mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-09 08:55:04 +02:00
Fix:Playlist API endpoint permissions
This commit is contained in:
parent
a2347150a2
commit
d41366a417
1 changed files with 0 additions and 8 deletions
|
@ -187,14 +187,6 @@ class PlaylistController {
|
|||
req.playlist = playlist
|
||||
}
|
||||
|
||||
if (req.method == 'DELETE' && !req.user.canDelete) {
|
||||
Logger.warn(`[PlaylistController] User attempted to delete without permission`, req.user.username)
|
||||
return res.sendStatus(403)
|
||||
} else if ((req.method == 'PATCH' || req.method == 'POST') && !req.user.canUpdate) {
|
||||
Logger.warn('[PlaylistController] User attempted to update without permission', req.user.username)
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
next()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue