|
|
|
@ -213,7 +213,10 @@ namespace MediaBrowser.Api.UserLibrary
|
|
|
|
|
request.IncludeItemTypes = "Playlist";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isInEnabledFolder = user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id);
|
|
|
|
|
bool isInEnabledFolder = user.Policy.EnabledFolders.Any(i => new Guid(i) == item.Id)
|
|
|
|
|
// Assume all folders inside an EnabledChannel are enabled
|
|
|
|
|
|| user.Policy.EnabledChannels.Any(i => new Guid(i) == item.Id);
|
|
|
|
|
|
|
|
|
|
var collectionFolders = _libraryManager.GetCollectionFolders(item);
|
|
|
|
|
foreach (var collectionFolder in collectionFolders)
|
|
|
|
|
{
|
|
|
|
@ -225,7 +228,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!(item is UserRootFolder) && !user.Policy.EnableAllFolders && !isInEnabledFolder)
|
|
|
|
|
if (!(item is UserRootFolder) && !user.Policy.EnableAllFolders && !isInEnabledFolder && !user.Policy.EnableAllChannels)
|
|
|
|
|
{
|
|
|
|
|
Logger.LogWarning("{UserName} is not permitted to access Library {ItemName}.", user.Name, item.Name);
|
|
|
|
|
return new QueryResult<BaseItem>
|
|
|
|
|