Open Closed

AbpAuditLogs - insert Ipv4 instead of Ipv6 into CleintAddress and Normalize table field TenantName as we are already gettinf tenantId from tenant table? #2983


User avatar
0
ronaksbhavsar created
  • ABP Framework version: v5.2.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: AbpAuditLogs
  • Steps to reproduce the issue:" Can we add Ipv4 address into ClientIpAddress field of AuditLog table and Normalize Auditlogs table as it has both TenantId and TenantName fields?


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can override the GetClientIpAddress method to use IPV6 address.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/WebClientInfo/HttpContextWebClientInfoProvider.cs#L30

    Normalize Auditlogs table as it has both TenantId and TenantName fields?

    What do you mean? Can you explain?

  • User Avatar
    0
    ronaksbhavsar created

    hi

    You can override the GetClientIpAddress method to use IPV6 address.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/WebClientInfo/HttpContextWebClientInfoProvider.cs#L30

    Normalize Auditlogs table as it has both TenantId and TenantName fields?

    What do you mean? Can you explain?

    Can't we get tenantName from tenantid as it has foreign key relation, Do we required to add tenantname?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The** tenant id** may be changed by code, so the caller is responsible for passing the tenant name.

    using(currentTenant.Change(tenantId))
    {
    
    }
    
    
  • User Avatar
    0
    ronaksbhavsar created

    hi

    The** tenant id** may be changed by code, so the caller is responsible for passing the tenant name.

    using(currentTenant.Change(tenantId)) 
    { 
     
    } 
     
    

    Okay Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You're welcome. : )

Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07