diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-11-10 09:49:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-10 09:49:56 -0500 |
| commit | 43f3b6097fbc5bb17f281dae123553ee52ee0a37 (patch) | |
| tree | 3e6aba78db9452803edf552189e8659faf2d0b6a /MediaBrowser.Api/UserLibrary/ItemsService.cs | |
| parent | b580209848e25f9de597a9797eae7a8813c4e3ab (diff) | |
| parent | 9b891f2c9a4f37e2a914dc8fc5faba4e919e2b8f (diff) | |
Merge pull request #2279 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index d75e42850..a07128f74 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -41,6 +41,7 @@ namespace MediaBrowser.Api.UserLibrary private readonly ILocalizationManager _localization; private readonly IDtoService _dtoService; + private readonly IAuthorizationContext _authContext; /// <summary> /// Initializes a new instance of the <see cref="ItemsService" /> class. @@ -49,7 +50,7 @@ namespace MediaBrowser.Api.UserLibrary /// <param name="libraryManager">The library manager.</param> /// <param name="localization">The localization.</param> /// <param name="dtoService">The dto service.</param> - public ItemsService(IUserManager userManager, ILibraryManager libraryManager, ILocalizationManager localization, IDtoService dtoService) + public ItemsService(IUserManager userManager, ILibraryManager libraryManager, ILocalizationManager localization, IDtoService dtoService, IAuthorizationContext authContext) { if (userManager == null) { @@ -72,6 +73,7 @@ namespace MediaBrowser.Api.UserLibrary _libraryManager = libraryManager; _localization = localization; _dtoService = dtoService; + _authContext = authContext; } /// <summary> @@ -100,7 +102,7 @@ namespace MediaBrowser.Api.UserLibrary { var user = !string.IsNullOrWhiteSpace(request.UserId) ? _userManager.GetUserById(request.UserId) : null; - var dtoOptions = GetDtoOptions(request); + var dtoOptions = GetDtoOptions(_authContext, request); var result = await GetQueryResult(request, dtoOptions, user).ConfigureAwait(false); |
