mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
Implement check to hide all libraries when user has no access (#9536)
This commit is contained in:
parent
eb59456e78
commit
bb5bf0277a
@ -1503,6 +1503,12 @@ namespace Emby.Server.Implementations.Library
|
|||||||
});
|
});
|
||||||
|
|
||||||
query.TopParentIds = userViews.SelectMany(i => GetTopParentIdsForQuery(i, user)).ToArray();
|
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…
x
Reference in New Issue
Block a user