Open Closed

QueryStringTenantResolveContributor not working #1556


User avatar
0
learnabp created

When the user is not logged in I would like to user the __teantid= parament to set the teannt but it doesn't seem to be working.

can you please help


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

    hi

    It's should be __tenant by default.

    https://docs.abp.io/en/abp/latest/Multi-Tenancy#abpaspnetcoremultitenancyoptions

  • User Avatar
    0
    learnabp created

    i have tried that it does wirk unless the user is authenticated

  • User Avatar
    0
    learnabp created

    Have a lok at the below screen shoot when at the login screen and not logged in when i supply the __tenantId as a QueryStringParamater it doesn't populate the Tenant-Switch-Box automatically

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can try to rewrite the logic of the page.

    abp\lepton-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\Themes\Lepton\Layouts\Account\Default.cshtml

    Change

     @if (MultiTenancyOptions.Value.IsEnabled &&
                  (TenantResolveResultAccessor.Result?.AppliedResolvers?.Contains(CookieTenantResolveContributor.ContributorName) == true))
    {
    
    }
    

    to

    @if (MultiTenancyOptions.Value.IsEnabled &&
                      (TenantResolveResultAccessor.Result?.AppliedResolvers?.Contains(CookieTenantResolveContributor.ContributorName) == true ||
                       TenantResolveResultAccessor.Result?.AppliedResolvers?.Contains(QueryStringTenantResolveContributor.ContributorName) == true))
    {
    
    }
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We will do same change in 4.4

    https://github.com/abpframework/abp/pull/9510

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

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