summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--application/core/MY_Controller.php2
-rw-r--r--application/service/user.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 94adab041..15a622ad6 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ This file lists major, incompatible or otherwise important changes, you should l
NEXT
- Log PublicApiException to error log
- - Reclassify various user input exceptions
+ - Reclassify various user input/insufficient permission exceptions
3.4.3 2019-12-07
- PHP 7.4 compatibility fixes
diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php
index 250c9d95c..f33dedbb3 100644
--- a/application/core/MY_Controller.php
+++ b/application/core/MY_Controller.php
@@ -54,7 +54,7 @@ class MY_Controller extends CI_Controller {
protected function _require_cli_request()
{
if (!is_cli()) {
- throw new \exceptions\PublicApiException("api/cli-only", "This function can only be accessed via the CLI interface");
+ throw new \exceptions\InsufficientPermissionsException("api/cli-only", "This function can only be accessed via the CLI interface");
}
}
diff --git a/application/service/user.php b/application/service/user.php
index 336941ca4..1d678106a 100644
--- a/application/service/user.php
+++ b/application/service/user.php
@@ -93,7 +93,7 @@ class user {
->count_all_results();
if ($invitations + 1 > $CI->config->item('max_invitation_keys')) {
- throw new \exceptions\PublicApiException("user/invitation-limit", "You can't create more invitation keys at this time.");
+ throw new \exceptions\InsufficientPermissionsException("user/invitation-limit", "You can't create more invitation keys at this time.");
}
$key = random_alphanum(12, 16);