Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjeev Papnoi committed Jul 19, 2021
1 parent 0bbc7f0 commit 9f41305
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Controller/Thread.php
Expand Up @@ -42,6 +42,11 @@ public function saveThread($ticketId, Request $request)

$ticket = $entityManager->getRepository(Ticket::class)->findOneById($ticketId);

// Proceed only if user has access to the resource
if (false == $this->ticketService->isTicketAccessGranted($ticket)) {
throw new \Exception('Access Denied', 403);
}

if (empty($ticket)) {
throw new \Exception('Ticket not found', 404);
} else if ('POST' !== $request->getMethod()) {
Expand Down

0 comments on commit 9f41305

Please sign in to comment.