23 lines
928 B
Plaintext
23 lines
928 B
Plaintext
<CascadingAuthenticationState>
|
|
<Router AppAssembly="typeof(App).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)">
|
|
<NotAuthorized>
|
|
@if (!context.User.Identity?.IsAuthenticated ?? true)
|
|
{
|
|
<meta http-equiv="refresh" content="0;url=/account/login" />
|
|
}
|
|
else
|
|
{
|
|
<div style="padding:2rem">
|
|
<h2>Access denied</h2>
|
|
<p>You do not have permission to view this page.</p>
|
|
</div>
|
|
}
|
|
</NotAuthorized>
|
|
</AuthorizeRouteView>
|
|
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
|
</Found>
|
|
</Router>
|
|
</CascadingAuthenticationState>
|