Implement check to hide all libraries when user has no access (#9536)

This commit is contained in:
elmuffo
2023-04-02 09:01:05 +12:00
committed by GitHub
parent eb59456e78
commit bb5bf0277a

View File

@@ -1503,6 +1503,12 @@ namespace Emby.Server.Implementations.Library
});
query.TopParentIds = userViews.SelectMany(i => GetTopParentIdsForQuery(i, user)).ToArray();
// Prevent searching in all libraries due to empty filter
if (query.TopParentIds.Length == 0)
{
query.TopParentIds = new[] { Guid.NewGuid() };
}
}
}