From aff8aaba12769a742b44bf15f15018fb9ca5093e Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Mon, 30 Oct 2023 19:27:04 -0700 Subject: [PATCH] Use InformationException --- src/Api/Admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Admin.php b/src/Api/Admin.php index e132a53..39a139b 100644 --- a/src/Api/Admin.php +++ b/src/Api/Admin.php @@ -60,7 +60,7 @@ public function can_do_something($data) * The third parameter is the name of the permission key we are checking (`do_something`) */ if (!$staff_service->hasPermission(null, 'example', 'do_something')) { - throw new \Box_Exception('You do not have permission to perform this action', [], 403); + throw new \FOSSBilling\InformationException('You do not have permission to perform this action', [], 403); } return true; @@ -86,7 +86,7 @@ public function check_select($data) * The final parameter is the contraint we want to apply for the staff member's permission. When using the select type pemission, this is how you check if they have a specific one. (`value_1` for example) */ if (!$staff_service->hasPermission(null, 'example', 'a_select', $data['constraint'])) { - throw new \Box_Exception('You do not have permission to perform this action', [], 403); + throw new \FOSSBilling\InformationException('You do not have permission to perform this action', [], 403); } return true;