From 752a6e8adbaa724baa4a6a6b824c2893c95922c8 Mon Sep 17 00:00:00 2001 From: Jay Malhotra <5047192+SapiensAnatis@users.noreply.github.com> Date: Mon, 26 Aug 2024 02:57:48 +0100 Subject: [PATCH] Fix user impersonation (#1041) Broken due to global query filters on DbPlayerUserData probably --- .../DragaliaAPI/Features/GraphQL/ImpersionationMutations.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DragaliaAPI/DragaliaAPI/Features/GraphQL/ImpersionationMutations.cs b/DragaliaAPI/DragaliaAPI/Features/GraphQL/ImpersionationMutations.cs index f431893b6..b1d8b9b1a 100644 --- a/DragaliaAPI/DragaliaAPI/Features/GraphQL/ImpersionationMutations.cs +++ b/DragaliaAPI/DragaliaAPI/Features/GraphQL/ImpersionationMutations.cs @@ -33,7 +33,8 @@ long targetViewerId using IDisposable userImpersonation = this.StartUserImpersonation(viewerId); string targetAccountId = this - .apiContext.Players.Include(x => x.UserData) + .apiContext.Players.IgnoreQueryFilters() + .Include(x => x.UserData) .Where(x => x.UserData!.ViewerId == targetViewerId) .Select(x => x.AccountId) .First();