Skip to content
Snippets Groups Projects
Commit 12a46bc9 authored by Peter Rotich's avatar Peter Rotich
Browse files

TicketModel > Ticket

parent d496b10f
No related branches found
No related tags found
No related merge requests found
...@@ -315,7 +315,7 @@ if($ticket->isOverdue()) ...@@ -315,7 +315,7 @@ if($ticket->isOverdue())
</ul> </ul>
</div> </div>
<?php <?php
if ($role->hasPerm(TicketModel::PERM_EDIT)) { if ($role->hasPerm(Ticket::PERM_EDIT)) {
$numCollaborators = $ticket->getThread()->getNumCollaborators(); $numCollaborators = $ticket->getThread()->getNumCollaborators();
if ($ticket->getThread()->getNumCollaborators()) if ($ticket->getThread()->getNumCollaborators())
$recipients = sprintf(__('%d'), $recipients = sprintf(__('%d'),
......
...@@ -113,7 +113,7 @@ if($_POST && !$errors): ...@@ -113,7 +113,7 @@ if($_POST && !$errors):
switch(strtolower($_POST['do'])): switch(strtolower($_POST['do'])):
case 'addcc': case 'addcc':
$errors = array(); $errors = array();
if (!$role->hasPerm(TicketModel::PERM_EDIT)) { if (!$role->hasPerm(Ticket::PERM_EDIT)) {
$errors['err']=__('Permission Denied. You are not allowed to add collaborators'); $errors['err']=__('Permission Denied. You are not allowed to add collaborators');
} elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) { } elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) {
$errors['err'] = __('Unknown user selected'); $errors['err'] = __('Unknown user selected');
......
...@@ -367,7 +367,7 @@ if($_POST && !$errors): ...@@ -367,7 +367,7 @@ if($_POST && !$errors):
} }
break; break;
case 'addcc': case 'addcc':
if (!$role->hasPerm(TicketModel::PERM_EDIT)) { if (!$role->hasPerm(Ticket::PERM_EDIT)) {
$errors['err']=__('Permission Denied. You are not allowed to add collaborators'); $errors['err']=__('Permission Denied. You are not allowed to add collaborators');
} elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) { } elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) {
$errors['err'] = __('Unknown user selected'); $errors['err'] = __('Unknown user selected');
...@@ -382,7 +382,7 @@ if($_POST && !$errors): ...@@ -382,7 +382,7 @@ if($_POST && !$errors):
} }
break; break;
case 'addbcc': case 'addbcc':
if (!$role->hasPerm(TicketModel::PERM_EDIT)) { if (!$role->hasPerm(Ticket::PERM_EDIT)) {
$errors['err']=__('Permission Denied. You are not allowed to add collaborators'); $errors['err']=__('Permission Denied. You are not allowed to add collaborators');
} elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) { } elseif (!$_POST['user_id'] || !($user=User::lookup($_POST['user_id']))) {
$errors['err'] = __('Unknown user selected'); $errors['err'] = __('Unknown user selected');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment