Fix media folders endpoint access control
This commit is contained in:
parent
fb9023f2d8
commit
9f352ccb5b
|
@ -491,6 +491,12 @@ namespace Jellyfin.Api.Controllers
|
||||||
{
|
{
|
||||||
var items = _libraryManager.GetUserRootFolder().Children.Concat(_libraryManager.RootFolder.VirtualChildren).OrderBy(i => i.SortName).ToList();
|
var items = _libraryManager.GetUserRootFolder().Children.Concat(_libraryManager.RootFolder.VirtualChildren).OrderBy(i => i.SortName).ToList();
|
||||||
|
|
||||||
|
if (!User.GetIsApiKey() && !User.IsInRole(UserRoles.Administrator))
|
||||||
|
{
|
||||||
|
var user = _userManager.GetUserById(User.GetUserId());
|
||||||
|
items = items.Where(i => i.IsVisible(user)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
if (isHidden.HasValue)
|
if (isHidden.HasValue)
|
||||||
{
|
{
|
||||||
var val = isHidden.Value;
|
var val = isHidden.Value;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user