28 lines
994 B
Plaintext
28 lines
994 B
Plaintext
<Router AppAssembly="typeof(Program).Assembly">
|
|
<Found Context="routeData">
|
|
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)">
|
|
<NotAuthorized>
|
|
@if (context.User.Identity?.IsAuthenticated != true)
|
|
{
|
|
<RedirectToLogin />
|
|
}
|
|
else
|
|
{
|
|
<div class="alert alert-danger">
|
|
<p>Non hai i permessi necessari per accedere a questa risorsa.</p>
|
|
</div>
|
|
}
|
|
</NotAuthorized>
|
|
</AuthorizeRouteView>
|
|
<FocusOnNavigate RouteData="routeData" Selector="h1" />
|
|
</Found>
|
|
<NotFound>
|
|
<PageTitle>Not found</PageTitle>
|
|
<LayoutView Layout="typeof(Layout.MainLayout)">
|
|
<div class="alert alert-warning">
|
|
<p role="alert">Pagina non trovata!</p>
|
|
</div>
|
|
</LayoutView>
|
|
</NotFound>
|
|
</Router>
|