mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-08 23:04:51 +02:00
Add:User permission restrict explicit content #637
This commit is contained in:
@ -225,13 +225,8 @@ class PodcastController {
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
|
||||
// Check user can access this library
|
||||
if (!req.user.checkCanAccessLibrary(item.libraryId)) {
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
// Check user can access this library item
|
||||
if (!req.user.checkCanAccessLibraryItemWithTags(item.media.tags)) {
|
||||
if (!req.user.checkCanAccessLibraryItem(item)) {
|
||||
return res.sendStatus(403)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user