From f62e9669236bcd6a1ba41d03a8bac71bb7dbcb63 Mon Sep 17 00:00:00 2001
From: Mat Whitney <mwhitney@mail.sdsu.edu>
Date: Thu, 22 Feb 2018 12:07:36 -0800
Subject: [PATCH] Check permissions before displaying Close Task

Don't display the Close Task option if the current user can't close it...
---
 include/staff/templates/task-view.tmpl.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php
index 0fe384b58..5b03857f0 100644
--- a/include/staff/templates/task-view.tmpl.php
+++ b/include/staff/templates/task-view.tmpl.php
@@ -154,7 +154,7 @@ if ($task->isOverdue())
                             echo __('Reopen');?> </a>
                     </li>
                     <?php
-                    } else {
+                    } elseif ($canClose) {
                     ?>
                     <li>
                         <a class="no-pjax task-action"
@@ -212,7 +212,7 @@ if ($task->isOverdue())
                                 echo __('Reopen');?> </a>
                         </li>
                         <?php
-                        } else {
+                        } elseif ($canClose) {
                         ?>
                         <li>
                             <a class="no-pjax task-action"
-- 
GitLab