mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-12-01 20:54:06 +01:00
Update:Authors page check user can access library items and can edit
This commit is contained in:
1 parent
4f7588c87d
commit
7f27eabf3e
4 files changed
+11
-7
No files matched your search
@@ -16,6 +16,7 @@ class AuthorController {
|
||||
// Used on author landing page to include library items and items grouped in series
|
||||
if (include.includes('items')) {
|
||||
authorJson.libraryItems = this.db.libraryItems.filter(li => {
|
||||
if (!req.user.checkCanAccessLibraryItem(li)) return false // filter out library items user cannot access
|
||||
return li.media.metadata.hasAuthor && li.media.metadata.hasAuthor(req.author.id)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user