Skip to content

Commit

Permalink
Merge branch '1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjeev Papnoi committed Jul 19, 2021
2 parents 0df1b78 + 9f41305 commit 1591db9
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 1591db9

Please sign in to comment.