Only show approval button is approval is required

media
Pat Hartl 2023-09-30 16:39:17 -05:00
parent 3d86a617a9
commit 04b8d45af4
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,7 @@
</PropertyColumn> </PropertyColumn>
<ActionColumn> <ActionColumn>
<Space Style="display: flex; justify-content: end"> <Space Style="display: flex; justify-content: end">
@if (!context.Approved) @if (Settings.Authentication.RequireApproval && !context.Approved)
{ {
<SpaceItem> <SpaceItem>
<Button OnClick="() => ApproveUser(context)" Type="@ButtonType.Primary">Approve</Button> <Button OnClick="() => ApproveUser(context)" Type="@ButtonType.Primary">Approve</Button>
@ -66,6 +66,7 @@
@code { @code {
ICollection<UserViewModel> UserList { get; set; } ICollection<UserViewModel> UserList { get; set; }
LANCommanderSettings Settings = SettingService.GetSettings();
bool Loading = true; bool Loading = true;
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()