From 5fe2a470a943f06c3996b92e1b4c930271594dbd Mon Sep 17 00:00:00 2001 From: Daniel Wathen Date: Mon, 6 Mar 2023 10:25:46 -0700 Subject: [PATCH] Fixed bug where delete functionality is given to non-admin members. --- Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml b/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml index 39521bd..ce75e48 100644 --- a/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml +++ b/Fab2ApprovalSystem/Views/Home/CorrectiveActionList.cshtml @@ -37,7 +37,8 @@ columns.Bound(l => l.PendingAIOwners).Title("Action Item Owners"); columns.Bound(l => l.D8DueDate).Format("{0:MM/dd/yy}"); columns.Bound(l => l.ClosedDate).Format("{0:MM/dd/yy}"); - columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"button delete"); + if ((bool)Session[GlobalVars.IS_ADMIN]) + columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"button delete"); })