mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Fix:Accessing series page for some users #787
This commit is contained in:
parent
7beca048e7
commit
63e5cf2e60
@ -70,7 +70,7 @@ class SeriesController {
|
|||||||
* Filter out any library items not accessible to user
|
* Filter out any library items not accessible to user
|
||||||
*/
|
*/
|
||||||
const libraryItems = Database.libraryItems.filter(li => li.media.metadata.hasSeries?.(series.id))
|
const libraryItems = Database.libraryItems.filter(li => li.media.metadata.hasSeries?.(series.id))
|
||||||
const libraryItemsAccessible = libraryItems.filter(req.user.checkCanAccessLibraryItem)
|
const libraryItemsAccessible = libraryItems.filter(li => req.user.checkCanAccessLibraryItem(li))
|
||||||
if (libraryItems.length && !libraryItemsAccessible.length) {
|
if (libraryItems.length && !libraryItemsAccessible.length) {
|
||||||
Logger.warn(`[SeriesController] User attempted to access series "${series.id}" without access to any of the books`, req.user)
|
Logger.warn(`[SeriesController] User attempted to access series "${series.id}" without access to any of the books`, req.user)
|
||||||
return res.sendStatus(403)
|
return res.sendStatus(403)
|
||||||
|
Loading…
Reference in New Issue
Block a user