aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Extensions/DtoExtensions.cs
diff options
context:
space:
mode:
authoradrez99 <59739805+adrez99@users.noreply.github.com>2022-10-11 18:15:28 +0200
committerGitHub <noreply@github.com>2022-10-11 18:15:28 +0200
commit177f53444d7f0d6541b660c4afb8d46c5614472c (patch)
treeb2d7ef47f415ccb3d5090a25fdcb612d0a55b25c /Jellyfin.Api/Extensions/DtoExtensions.cs
parentb8afdd892af01fd99011a6dc3df65cfb762084d6 (diff)
parentd50c1b2d4bc0c85428671b288adef1b336da1156 (diff)
Merge branch 'jellyfin:master' into gzip
Diffstat (limited to 'Jellyfin.Api/Extensions/DtoExtensions.cs')
-rw-r--r--Jellyfin.Api/Extensions/DtoExtensions.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Jellyfin.Api/Extensions/DtoExtensions.cs b/Jellyfin.Api/Extensions/DtoExtensions.cs
index 5e338b67d..9e784f7c4 100644
--- a/Jellyfin.Api/Extensions/DtoExtensions.cs
+++ b/Jellyfin.Api/Extensions/DtoExtensions.cs
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
-using Jellyfin.Api.Helpers;
+using System.Security.Claims;
using Jellyfin.Extensions;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Model.Entities;
@@ -22,14 +22,14 @@ namespace Jellyfin.Api.Extensions
/// Legacy order: 2.
/// </remarks>
/// <param name="dtoOptions">DtoOptions object.</param>
- /// <param name="request">Current request.</param>
+ /// <param name="user">Current claims principal.</param>
/// <returns>Modified DtoOptions object.</returns>
internal static DtoOptions AddClientFields(
- this DtoOptions dtoOptions, HttpRequest request)
+ this DtoOptions dtoOptions, ClaimsPrincipal user)
{
dtoOptions.Fields ??= Array.Empty<ItemFields>();
- string? client = ClaimHelpers.GetClient(request.HttpContext.User);
+ string? client = user.GetClient();
// No client in claim
if (string.IsNullOrEmpty(client))