diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-18 00:44:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-18 00:44:33 -0500 |
| commit | e7cebb91a73354dc3e0d0b6340c9fbd6511f4406 (patch) | |
| tree | 6f1c368c766c17b7514fe749c0e92e69cd89194a /MediaBrowser.Api/UserLibrary/ItemsService.cs | |
| parent | 025905a3e4d50b9a2e07fbf4ff0a203af6604ced (diff) | |
| parent | aaa027f3229073e9a40756c3157d41af2a442922 (diff) | |
Merge pull request #2350 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 04395da3c..a07128f74 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -1,16 +1,16 @@ using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Localization; using MediaBrowser.Controller.Net; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; -using ServiceStack; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading.Tasks; +using MediaBrowser.Model.Globalization; +using MediaBrowser.Model.Services; namespace MediaBrowser.Api.UserLibrary { @@ -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); |
