Update remove book from collection endpoint to require Can Update permission instead of Can Delete

This commit is contained in:
advplyr committed 2026-11-12 17:11:08 -06:00
1 parent 3e0333877b
commit 75d85e971b
2 files changed
+3 -7

No files matched your search

+1 -1
View File
@@ -446,7 +446,7 @@ class CollectionController {
if (req.method == 'DELETE' && !req.params.bookId && !req.user.canDelete) {
Logger.warn(`[CollectionController] User "${req.user.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.method == 'DELETE' && req.params.bookId)) && !req.user.canUpdate) {
Logger.warn(`[CollectionController] User "${req.user.username}" attempted to update without permission`)
return res.sendStatus(403)
}