mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-25 06:58:40 +02:00
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`).
This commit is contained in:
parent
e1da046960
commit
7919dd81da
|
@ -24,6 +24,7 @@
|
||||||
- [Lynxy](https://github.com/Lynxy)
|
- [Lynxy](https://github.com/Lynxy)
|
||||||
- [fasheng](https://github.com/fasheng)
|
- [fasheng](https://github.com/fasheng)
|
||||||
- [ploughpuff](https://github.com/ploughpuff)
|
- [ploughpuff](https://github.com/ploughpuff)
|
||||||
|
- [pjeanjean](https://github.com/pjeanjean)
|
||||||
|
|
||||||
# Emby Contributors
|
# Emby Contributors
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
request.IncludeItemTypes = "Playlist";
|
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);
|
Logger.LogWarning("{UserName} is not permitted to access Library {ItemName}.", user.Name, item.Name);
|
||||||
return new QueryResult<BaseItem>
|
return new QueryResult<BaseItem>
|
||||||
|
|
Loading…
Reference in a new issue