0
Leonardo.Willrich created
- ABP Framework version: v4.3.0
- UI type: Blazor
- DB provider: EF Core
Hi,
Is there a way to have two different Startup pages, one for Tenant side (when user is logged as Tenant) and another one for Host side (when the user is logged as SaaS admin)?
I don't want to have the Home page, my main pages will be a different one.
How can I do that? I've tried to redirect from Index.razor, but the CurrentTenant.Id is always returning null.
public partial class Index
{
[Inject] public NavigationManager NavigationManager { get; set; }
[Inject] ICurrentTenant CurrentTenant { get; set; }
protected override void OnInitialized()
{
// https://support.abp.io/QA/Questions/1152/How-to-to-Login-page-when-accessing-the-app-and-after-logout
// The CurrentUser.IsAuthenticated is not working properly, even if the user is logged, it redirects to login page
if (!CurrentUser.IsAuthenticated)
{
Console.WriteLine("Redirecting to Login");
NavigationManager.NavigateTo("/authentication/login");
}
// It doesn't work, CurrentTenantId is always Null
/*
if (CurrentTenant.Id.HasValue)
{
NavigationManager.NavigateTo("/outagereportmap");
}
else
{
NavigationManager.NavigateTo("/tenantactivity");
}
*/
}
}
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
5 Answer(s)
-
0
Ok, I'll follow that. Apart from using the Index page to redirect, is there another way to set that startup page?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi, any progress on this?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
This question has been automatically marked as stale because it has not had recent activity.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)