From 51bcd7c3e0a25dc95ce5fb01df65ba799997faf1 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 6 Aug 2015 03:38:06 -0500
Subject: [PATCH] staff: Fixup ::canManageTickets() to support non-global perms

---
 include/class.staff.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/class.staff.php b/include/class.staff.php
index 8501cb773..d281bb984 100644
--- a/include/class.staff.php
+++ b/include/class.staff.php
@@ -419,9 +419,10 @@ implements AuthenticatedUser, EmailContact, TemplateVariable {
     }
 
     function canManageTickets() {
-        return ($this->isAdmin()
-                || $this->hasPerm(TicketModel::PERM_DELETE)
-                || $this->hasPerm(TicketModel::PERM_CLOSE));
+        return $this->hasPerm(TicketModel::PERM_DELETE, false)
+                || $this->hasPerm(TicketModel::PERM_TRANSFER, false)
+                || $this->hasPerm(TicketModel::PERM_ASSIGN, false)
+                || $this->hasPerm(TicketModel::PERM_CLOSE, false);
     }
 
     function isManager() {
-- 
GitLab