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

pull/9584/head
elmuffo 2 years ago committed by GitHub
parent eb59456e78
commit bb5bf0277a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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() };
}
}
}

Loading…
Cancel
Save