From 409981873fefb67a40dbe1e2a7f5f8f54dbab608 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 15 Jun 2021 14:06:32 +0800 Subject: [PATCH] Add ImpersonatorUserId&ImpersonatorTenantId to CurrentUserDto. --- .../Mvc/ApplicationConfigurations/CurrentUserDto.cs | 4 ++++ .../AbpApplicationConfigurationAppService.cs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs index 5d1f6d8414..b1b97c4b91 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs @@ -11,6 +11,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations public Guid? TenantId { get; set; } + public Guid? ImpersonatorUserId { get; set; } + + public Guid? ImpersonatorTenantId { get; set; } + public string UserName { get; set; } public string Name { get; set; } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs index eab7d968a9..c60fdeac93 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs @@ -127,6 +127,8 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations IsAuthenticated = _currentUser.IsAuthenticated, Id = _currentUser.Id, TenantId = _currentUser.TenantId, + ImpersonatorUserId = _currentUser.FindImpersonatorUserId(), + ImpersonatorTenantId = _currentUser.FindImpersonatorTenantId(), UserName = _currentUser.UserName, SurName = _currentUser.SurName, Name = _currentUser.Name,