catchAdmin/modules/Permissions/Exceptions/PermissionForbidden.php

21 lines
403 B
PHP
Raw Normal View History

2022-12-14 19:25:52 +08:00
<?php
namespace Modules\Permissions\Exceptions;
use Catch\Enums\Code;
use Catch\Exceptions\CatchException;
2022-12-23 19:47:13 +08:00
use Symfony\Component\HttpFoundation\Response;
2022-12-14 19:25:52 +08:00
class PermissionForbidden extends CatchException
{
protected $message = 'permission forbidden';
protected $code = Code::PERMISSION_FORBIDDEN;
2022-12-23 19:47:13 +08:00
public function statusCode(): int
{
return Response::HTTP_FORBIDDEN;
}
2022-12-14 19:25:52 +08:00
}