mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
adressing pr comments
This commit is contained in:
parent
967d5deeb7
commit
1d631540ac
@ -228,12 +228,12 @@ namespace MediaBrowser.Api.UserLibrary
|
|||||||
request.IncludeItemTypes = "Playlist";
|
request.IncludeItemTypes = "Playlist";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user.Policy.EnabledFolders.Where(i => new Guid(i).Equals(item.Id)).Any() && !user.Policy.EnableAllFolders)
|
if (!user.Policy.EnableAllFolders && !user.Policy.EnabledFolders.Any(i => new Guid(i).Equals(item.Id)))
|
||||||
{
|
{
|
||||||
Logger.LogWarning($"{user.Name} is not permitted to access Library {item.Name}.");
|
Logger.LogWarning($"{user.Name} is not permitted to access Library {item.Name}.");
|
||||||
return new QueryResult<BaseItem>
|
return new QueryResult<BaseItem>
|
||||||
{
|
{
|
||||||
Items = new BaseItem[0],
|
Items = Array.Empty<BaseItem>(),
|
||||||
TotalRecordCount = 0
|
TotalRecordCount = 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user