Use a better method to share common page layout
This commit is contained in:
@ -1,22 +0,0 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@layout MainLayout
|
||||
|
||||
<AuthorizeView Roles="@Roles">
|
||||
<Authorized>
|
||||
<CascadingValue Value="this">
|
||||
@Body
|
||||
</CascadingValue>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<RadzenAlert AllowClose="false" AlertStyle="AlertStyle.Danger" Variant="Variant.Flat" Shade="Shade.Lighter">
|
||||
У вас нет прав для доступа к этой странице
|
||||
</RadzenAlert>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
|
||||
@code {
|
||||
public string Roles { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user