Changes and fixes'
This commit is contained in:
parent
db6e971ccc
commit
d2096f366e
@ -1568,7 +1568,7 @@ function hesk_getAdminButtons($category_id)
|
||||
onclick="return hesk_confirmExecute(\''.hesk_makeJsString($hesklang['confirm_anony']).'?\\n\\n'.hesk_makeJsString($hesklang['privacy_anon_info']).'\');"
|
||||
title="'.$hesklang['confirm_anony'].'" class="button-link">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="panel-body warning">
|
||||
<h4>
|
||||
<i class="fa fa-shield fa-fw"></i> '.$hesklang['btn_anony'].'
|
||||
</h4>
|
||||
|
@ -362,7 +362,6 @@ elseif ($_POST['a']=='export') {
|
||||
$sql .= " AND " . hesk_myOwnership();
|
||||
|
||||
require_once(HESK_PATH . 'inc/custom_fields.inc.php');
|
||||
require_once(HESK_PATH . 'inc/statuses.inc.php');
|
||||
require(HESK_PATH . 'inc/export_functions.inc.php');
|
||||
|
||||
list($success_msg, $tickets_exported) = hesk_export_to_XML($sql, true);
|
||||
@ -414,9 +413,6 @@ elseif ($_POST['a']=='print') {
|
||||
// Load custom fields
|
||||
require_once(HESK_PATH . 'inc/custom_fields.inc.php');
|
||||
|
||||
// Load statuses
|
||||
require_once(HESK_PATH . 'inc/statuses.inc.php');
|
||||
|
||||
// List of staff
|
||||
if (!isset($admins)) {
|
||||
$admins = array();
|
||||
|
@ -17,5 +17,6 @@ class UserPrivilege extends \BaseClass {
|
||||
const CAN_MANAGE_CATEGORIES = 'can_man_cat';
|
||||
const CAN_VIEW_ASSIGNED_TO_OTHER = 'can_view_ass_others';
|
||||
const CAN_VIEW_UNASSIGNED = 'can_view_unassigned';
|
||||
const CAN_VIEW_ASSIGNED_BY_ME = 'can_view_ass_by';
|
||||
const CAN_MANAGE_SERVICE_MESSAGES = 'can_service_msg';
|
||||
}
|
@ -27,6 +27,11 @@ class UserToTicketChecker extends \BaseClass {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (in_array(UserPrivilege::CAN_VIEW_ASSIGNED_BY_ME, $user->permissions) &&
|
||||
$ticket->assignedBy === $user->id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!in_array($ticket->categoryId, $user->categories)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -136,6 +136,7 @@ class TicketCreator extends \BaseClass {
|
||||
if ($heskSettings['autoassign'] && $category->autoAssign) {
|
||||
$autoassignOwner = $this->autoassigner->getNextUserForTicket($ticketRequest->category, $heskSettings);
|
||||
$ticket->ownerId = $autoassignOwner === null ? null : $autoassignOwner->id;
|
||||
$ticket->assignedBy = -1;
|
||||
}
|
||||
|
||||
// Transform one-to-one properties
|
||||
|
@ -212,6 +212,15 @@ class TicketGateway extends CommonDao {
|
||||
$customWhere = '';
|
||||
$customWhat = '';
|
||||
|
||||
// Need to insert "addigned by" value?
|
||||
if ($ticket->assignedBy !== null) {
|
||||
$abWhere = ', `assignedby` ';
|
||||
$abWhat = ', ' . intval($ticket->assignedBy);
|
||||
} else {
|
||||
$abWhere = '';
|
||||
$abWhat = '';
|
||||
}
|
||||
|
||||
for ($i=1; $i<=50; $i++)
|
||||
{
|
||||
$customWhere .= ", `custom{$i}`";
|
||||
@ -272,6 +281,7 @@ class TicketGateway extends CommonDao {
|
||||
`due_date`,
|
||||
`history`
|
||||
{$customWhere}
|
||||
{$abWhere}
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ -301,6 +311,7 @@ class TicketGateway extends CommonDao {
|
||||
{$dueDate},
|
||||
'" . hesk_dbEscape($ticket->auditTrailHtml) . "'
|
||||
{$customWhat}
|
||||
{$abWhat}
|
||||
)
|
||||
";
|
||||
|
||||
|
@ -242,6 +242,15 @@ button.dropdown-submit {
|
||||
background-color: #ffcccc;
|
||||
}
|
||||
|
||||
.button-link .warning {
|
||||
background-color: #fcf8e3;
|
||||
color: #8a6d3b;
|
||||
}
|
||||
|
||||
.button-link .warning:hover {
|
||||
background-color: #faf2cc;
|
||||
}
|
||||
|
||||
.timeline-header {
|
||||
background: #ddd;
|
||||
border-left: solid 1px #ddd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user