Skip to content

Commit

Permalink
Use InformationException
Browse files Browse the repository at this point in the history
  • Loading branch information
BelleNottelling committed Oct 31, 2023
1 parent b83c49a commit aff8aab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Api/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check failure on line 63 in src/Api/Admin.php

View workflow job for this annotation

GitHub Actions / PHPStan - FOSSBilling Release

Instantiated class FOSSBilling\InformationException not found.
}

return true;
Expand All @@ -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);

Check failure on line 89 in src/Api/Admin.php

View workflow job for this annotation

GitHub Actions / PHPStan - FOSSBilling Release

Instantiated class FOSSBilling\InformationException not found.
}

return true;
Expand Down

0 comments on commit aff8aab

Please sign in to comment.