Преглед на файлове

[Permissions] Fix for individual channel plugins #2858

Without this change, the only Channel (plugin, not Live TV) permission that works is "Enable All Channels".

This is against the 10.6.z branch as the filename changed for 10.7 and I screwed up the previous backport PR.

Fixes #2858
PrplHaz4 преди 4 години
родител
ревизия
c48d7fe228
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      MediaBrowser.Api/UserLibrary/ItemsService.cs

+ 3 - 1
MediaBrowser.Api/UserLibrary/ItemsService.cs

@@ -215,7 +215,9 @@ namespace MediaBrowser.Api.UserLibrary
 
             bool isInEnabledFolder = user.GetPreference(PreferenceKind.EnabledFolders).Any(i => new Guid(i) == item.Id)
                     // Assume all folders inside an EnabledChannel are enabled
-                    || user.GetPreference(PreferenceKind.EnabledChannels).Any(i => new Guid(i) == item.Id);
+                    || user.GetPreference(PreferenceKind.EnabledChannels).Any(i => new Guid(i) == item.Id)
+                    // Assume all items inside an EnabledChannel are enabled
+                    || user.GetPreference(PreferenceKind.EnabledChannels).Any(i => new Guid(i) == item.ChannelId);
 
             var collectionFolders = _libraryManager.GetCollectionFolders(item);
             foreach (var collectionFolder in collectionFolders)