diff --git a/src/Extension/DefaultLanguagePackGuard.php b/src/Extension/DefaultLanguagePackGuard.php index 1b66f0166..ee1dc6d12 100644 --- a/src/Extension/DefaultLanguagePackGuard.php +++ b/src/Extension/DefaultLanguagePackGuard.php @@ -10,8 +10,8 @@ namespace Flarum\Extension; use Flarum\Extension\Event\Disabling; -use Flarum\Http\Exception\ForbiddenException; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\Exception\PermissionDeniedException; use Illuminate\Support\Arr; class DefaultLanguagePackGuard @@ -36,7 +36,7 @@ class DefaultLanguagePackGuard $locale = Arr::get($event->extension->extra, 'flarum-locale.code'); if ($locale === $defaultLocale) { - throw new ForbiddenException('You cannot disable the default language pack!'); + throw new PermissionDeniedException('You cannot disable the default language pack!'); } } } diff --git a/src/Foundation/ErrorServiceProvider.php b/src/Foundation/ErrorServiceProvider.php index aa7060bb5..1d892976d 100644 --- a/src/Foundation/ErrorServiceProvider.php +++ b/src/Foundation/ErrorServiceProvider.php @@ -33,7 +33,6 @@ class ErrorServiceProvider extends AbstractServiceProvider 'invalid_access_token' => 401, // 403 Forbidden - 'forbidden' => 403, 'invalid_confirmation_token' => 403, 'permission_denied' => 403, diff --git a/src/Http/Exception/ForbiddenException.php b/src/Http/Exception/ForbiddenException.php deleted file mode 100644 index 88c6555f0..000000000 --- a/src/Http/Exception/ForbiddenException.php +++ /dev/null @@ -1,21 +0,0 @@ -