mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-23 01:09:26 +02:00
Add:User permission restrict explicit content #637
This commit is contained in:
parent
6be741045f
commit
160dac109d
5 changed files with 19 additions and 16 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue