aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/ItemsService.cs
diff options
context:
space:
mode:
authorpjeanjean <rhiobet@gmail.com>2019-06-04 18:35:14 +0200
committerpjeanjean <rhiobet@gmail.com>2019-06-06 08:30:56 +0200
commit7919dd81da5d17a8799fbc31de2235687c66a5fd (patch)
tree83d961a881cc56e22297a6963159b2db95c5b41d /MediaBrowser.Api/UserLibrary/ItemsService.cs
parente1da046960bcf16c3e46db50c7d527c933397cad (diff)
Skip user permission checking for UserRootFolder
Fix #1436 UserRootFolders are used to represent virtual folders that exist outside of libraries. As such, it doesn't make sense to check if a user has the right to access their library (named `Media Folders`).
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 3c7ad1d0a..f1ae48492 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -224,7 +224,7 @@ namespace MediaBrowser.Api.UserLibrary
request.IncludeItemTypes = "Playlist";
}
- if (!user.Policy.EnableAllFolders && !user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id))
+ if (!(item is UserRootFolder) && !user.Policy.EnableAllFolders && !user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id))
{
Logger.LogWarning("{UserName} is not permitted to access Library {ItemName}.", user.Name, item.Name);
return new QueryResult<BaseItem>