From 4a157e0a2faa05f0b5795b6ee0d9b267122bc2cf Mon Sep 17 00:00:00 2001 From: Brian Cassidy Date: Tue, 24 Oct 2023 11:14:24 -0300 Subject: [PATCH] only allow trouble_ticket_eresources tagged tickets to be viewed --- .../public_trouble_tickets/src/Controller/TicketController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/modules/public_trouble_tickets/src/Controller/TicketController.php b/custom/modules/public_trouble_tickets/src/Controller/TicketController.php index 3c4e08e5..815d9be4 100644 --- a/custom/modules/public_trouble_tickets/src/Controller/TicketController.php +++ b/custom/modules/public_trouble_tickets/src/Controller/TicketController.php @@ -39,7 +39,7 @@ public function view(int $id) { $fogbugz = \Drupal::service('fogbugz_api.manager'); $case = $fogbugz->getCase($id); - if (!$case) { + if (!$case || !in_array('trouble_ticket_eresources', $case->getTags())) { throw new NotFoundHttpException(); }