Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user