"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Jellyfin.Api/Controllers/ItemsController.cs" between
jellyfin-10.8.7.tar.gz and jellyfin-10.8.8.tar.gz

About: Jellyfin is a suite of multimedia applications that puts you in control of managing and streaming your digital media.

ItemsController.cs  (jellyfin-10.8.7):ItemsController.cs  (jellyfin-10.8.8)
skipping to change at line 273 skipping to change at line 273
{ {
collectionType = hasCollectionType.CollectionType; collectionType = hasCollectionType.CollectionType;
} }
if (string.Equals(collectionType, CollectionType.Playlists, StringCo mparison.OrdinalIgnoreCase)) if (string.Equals(collectionType, CollectionType.Playlists, StringCo mparison.OrdinalIgnoreCase))
{ {
recursive = true; recursive = true;
includeItemTypes = new[] { BaseItemKind.Playlist }; includeItemTypes = new[] { BaseItemKind.Playlist };
} }
var enabledChannels = user!.GetPreferenceValues<Guid>(PreferenceKind
.EnabledChannels);
bool isInEnabledFolder = Array.IndexOf(user.GetPreferenceValues<Guid
>(PreferenceKind.EnabledFolders), item.Id) != -1
// Assume all folders inside an EnabledChan
nel are enabled
|| Array.IndexOf(enabledChannels, item.Id)
!= -1
// Assume all items inside an EnabledChanne
l are enabled
|| Array.IndexOf(enabledChannels, item.Chan
nelId) != -1;
var collectionFolders = _libraryManager.GetCollectionFolders(item);
foreach (var collectionFolder in collectionFolders)
{
if (user.GetPreferenceValues<Guid>(PreferenceKind.EnabledFolders
).Contains(collectionFolder.Id))
{
isInEnabledFolder = true;
}
}
if (item is not UserRootFolder if (item is not UserRootFolder
&& !isInEnabledFolder // api keys can always access all folders
&& !user.HasPermission(PermissionKind.EnableAllFolders) && !ClaimHelpers.GetIsApiKey(User)
&& !user.HasPermission(PermissionKind.EnableAllChannels) // check the item is visible for the user
&& !string.Equals(collectionType, CollectionType.Folders, String && !item.IsVisible(user))
Comparison.OrdinalIgnoreCase))
{ {
_logger.LogWarning("{UserName} is not permitted to access Librar y {ItemName}.", user.Username, item.Name); _logger.LogWarning("{UserName} is not permitted to access Librar y {ItemName}", user!.Username, item.Name);
return Unauthorized($"{user.Username} is not permitted to access Library {item.Name}."); return Unauthorized($"{user.Username} is not permitted to access Library {item.Name}.");
} }
if ((recursive.HasValue && recursive.Value) || ids.Length != 0 || it em is not UserRootFolder) if ((recursive.HasValue && recursive.Value) || ids.Length != 0 || it em is not UserRootFolder)
{ {
var query = new InternalItemsQuery(user) var query = new InternalItemsQuery(user)
{ {
IsPlayed = isPlayed, IsPlayed = isPlayed,
MediaTypes = mediaTypes, MediaTypes = mediaTypes,
IncludeItemTypes = includeItemTypes, IncludeItemTypes = includeItemTypes,
 End of changes. 3 change blocks. 
30 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)