diff --git a/admin/admin_reply_ticket.php b/admin/admin_reply_ticket.php index 5a422efe..2b85c6cc 100644 --- a/admin/admin_reply_ticket.php +++ b/admin/admin_reply_ticket.php @@ -62,7 +62,9 @@ hesk_dbConnect(); hesk_isLoggedIn(); /* Check permissions for this feature */ -hesk_checkPermission('can_reply_tickets'); +if (!isset($_REQUEST['isManager']) || !$_REQUEST['isManager']) { + hesk_checkPermission('can_reply_tickets'); +} /* A security check */ # hesk_token_check('POST'); @@ -310,7 +312,7 @@ else $sql .= ",`time_worked` = ADDTIME(`time_worked`,'" . hesk_dbEscape($time_worked) . "') "; } -if ( ! empty($_POST['assign_self']) && hesk_checkPermission('can_assign_self',0)) +if ( ! empty($_POST['assign_self']) && (hesk_checkPermission('can_assign_self',0) || (isset($_REQUEST['isManager']) && $_REQUEST['isManager']))) { $revision = sprintf($hesklang['thist2'],hesk_date(),$_SESSION['name'].' ('.$_SESSION['user'].')',$_SESSION['name'].' ('.$_SESSION['user'].')'); $sql .= " , `owner`=".intval($_SESSION['id']).", `history`=CONCAT(`history`,'".hesk_dbEscape($revision)."') "; diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php index 9720c1d9..3b5cfc32 100644 --- a/admin/admin_ticket.php +++ b/admin/admin_ticket.php @@ -859,7 +859,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); /* Do we need or have any canned responses? */ $can_options = hesk_printCanned(); - echo hesk_getAdminButtons(0,1,$isManager); + echo hesk_getAdminButtons(); ?>
@@ -995,16 +995,17 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); $isClosable = $isTicketClosedRow['Closable'] == 'yes' || $isTicketClosedRow['Closable'] == 'sonly'; echo '
'; + $mgr = $isManager ? '&isManager=1' : ''; if ($isTicketClosed == 0 && $isClosable) // Ticket is still open { echo ' + class="btn btn-default btn-sm" href="change_status.php?track='.$trackingID.$mgr.'&s='.$staffClosedOptionStatus['ID'].'&Refresh='.$random.'&token='.hesk_token_echo(0).'"> '.$hesklang['close_action'].''; } elseif ($isTicketClosed == 1) { echo ' + class="btn btn-default btn-sm" href="change_status.php?track='.$trackingID.$mgr.'&s='.$staffReopenedStatus['ID'].'&Refresh='.$random.'&token='.hesk_token_echo(0).'"> '.$hesklang['open_action'].''; } @@ -1065,8 +1066,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); - - + '; + if ($isManager) { + echo ''; + } + echo ' @@ -1089,13 +1093,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); - - + '; + if ($isManager) { + echo ''; + } + echo '
'; echo '

'.$hesklang['owner'].'

'; - if (hesk_checkPermission('can_assign_others',0)) + if (hesk_checkPermission('can_assign_others',0) || $isManager) { echo'
@@ -1273,7 +1280,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
- +


: @@ -1452,7 +1459,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); @@ -1635,9 +1642,9 @@ function hesk_getFontAwesomeIconForFileExtension($fileExtension) } -function hesk_getAdminButtons($reply=0,$white=1,$isManager) +function hesk_getAdminButtons($reply=0,$white=1) { - global $hesk_settings, $hesklang, $ticket, $reply, $trackingID, $can_edit, $can_archive, $can_delete; + global $hesk_settings, $hesklang, $ticket, $reply, $trackingID, $can_edit, $can_archive, $can_delete, $isManager; $options = '

'; @@ -1717,9 +1724,9 @@ function hesk_getAdminButtons($reply=0,$white=1,$isManager) } // END hesk_getAdminButtons() -function hesk_getAdminButtonsInTicket($reply=0,$white=1,$isManager=false) +function hesk_getAdminButtonsInTicket($reply=0,$white=1) { - global $hesk_settings, $hesklang, $ticket, $reply, $trackingID, $can_edit, $can_archive, $can_delete; + global $hesk_settings, $hesklang, $ticket, $reply, $trackingID, $can_edit, $can_archive, $can_delete, $isManager; $options = '
'; @@ -1769,82 +1776,38 @@ function print_form() global $trackingID; /* Print header */ - require_once(HESK_PATH . 'inc/header.inc.php'); + require_once(HESK_PATH . 'inc/headerAdmin.inc.php'); /* Print admin navigation */ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); - ?> - - - - - -  
- - - -
- - - - - - - - - - - - - - - - -
  - - - - - - - - - - - - - - - - - - - - -
-

-
  
  - :

  -
 
- - - -
 
-
- -

 

+
+
+

+
+
+ +
+
+ + +
+
+
+
+
- +

:

@@ -1906,7 +1869,7 @@ function hesk_printTicketReplies($isManager) { function hesk_printReplyForm() { - global $hesklang, $hesk_settings, $ticket, $admins, $can_options, $options, $can_assign_self; + global $hesklang, $hesk_settings, $ticket, $admins, $can_options, $options, $can_assign_self, $isManager; ?> @@ -2086,9 +2049,11 @@ function hesk_printReplyForm() { ?>
- + + +
-
diff --git a/admin/change_status.php b/admin/change_status.php index 1949719d..84d3761b 100644 --- a/admin/change_status.php +++ b/admin/change_status.php @@ -46,8 +46,10 @@ hesk_dbConnect(); hesk_isLoggedIn(); /* Check permissions for this feature */ -hesk_checkPermission('can_view_tickets'); -hesk_checkPermission('can_reply_tickets'); +if (!isset($_REQUEST['isManager']) || !$_REQUEST['isManager']) { + hesk_checkPermission('can_view_tickets'); + hesk_checkPermission('can_reply_tickets'); +} /* A security check */ hesk_token_check();