Remove redundant roles check
This commit is contained in:
@ -1,16 +1,11 @@
|
||||
@using Hcs.WebApp.Services
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
|
||||
@attribute [Authorize]
|
||||
|
||||
@inject RoleManager<AppRole> RoleManager
|
||||
@inject UsersService UsersService
|
||||
@inject DialogService DialogService
|
||||
|
||||
<AuthorizedContent Roles="@AppRole.ADMINISTRATOR_TYPE">
|
||||
<Content>
|
||||
<RadzenTemplateForm TItem="InputModel" Data=@Input Submit="@DoAddUserAsync">
|
||||
<RadzenAlert Visible="@hasError" AlertStyle="AlertStyle.Danger" Variant="Variant.Flat" Shade="Shade.Lighter" AllowClose="false">
|
||||
@errorMessage
|
||||
@ -56,8 +51,6 @@
|
||||
</RadzenStack>
|
||||
</RadzenStack>
|
||||
</RadzenTemplateForm>
|
||||
</Content>
|
||||
</AuthorizedContent>
|
||||
|
||||
@code {
|
||||
sealed class InputModel
|
||||
|
||||
@ -1,17 +1,12 @@
|
||||
@using Hcs.WebApp.Services
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
|
||||
@attribute [Authorize]
|
||||
|
||||
@inject UserManager<AppUser> UserManager;
|
||||
@inject RoleManager<AppRole> RoleManager
|
||||
@inject UsersService UsersService
|
||||
@inject DialogService DialogService
|
||||
|
||||
<AuthorizedContent Roles="@AppRole.ADMINISTRATOR_TYPE">
|
||||
<Content>
|
||||
<RadzenTemplateForm TItem="InputModel" Data=@Input Submit="@DoEditUserAsync">
|
||||
<RadzenAlert Visible="@hasError" AlertStyle="AlertStyle.Danger" Variant="Variant.Flat" Shade="Shade.Lighter" AllowClose="false">
|
||||
@errorMessage
|
||||
@ -53,8 +48,6 @@
|
||||
</RadzenStack>
|
||||
</RadzenStack>
|
||||
</RadzenTemplateForm>
|
||||
</Content>
|
||||
</AuthorizedContent>
|
||||
|
||||
@code {
|
||||
sealed class InputModel
|
||||
|
||||
Reference in New Issue
Block a user