From ce1cbe56266ff20b24b8d3cc5fe7390371ef12b5 Mon Sep 17 00:00:00 2001 From: Andreas Guldborg Hansen Date: Wed, 13 Mar 2024 07:46:26 +0100 Subject: [PATCH] Adds access for managers to voucher issuing (#31) --- Shifty.App/Pages/IssueVoucher.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shifty.App/Pages/IssueVoucher.razor b/Shifty.App/Pages/IssueVoucher.razor index bcad188..14f6788 100644 --- a/Shifty.App/Pages/IssueVoucher.razor +++ b/Shifty.App/Pages/IssueVoucher.razor @@ -2,7 +2,7 @@ @using Components @inject NavigationManager NavManager -@if (_user is not null && _user.IsInRole("Board")) +@if (_user is not null && (_user.IsInRole("Board") || _user.IsInRole("Manager"))) { } @@ -16,7 +16,7 @@ var authState = await AuthTask; _user = authState.User; - if (_user is null || !_user.IsInRole("Board")) + if (_user is null || (!_user.IsInRole("Board") && !_user.IsInRole("Manager"))) { NavManager.NavigateTo("/"); }