askvortsov
`
GET http://localhost/api/warnings/2
{
"errors": [
{
"status": "403",
"code": "permission_denied",
"detail": "Flarum\User\Exception\PermissionDeniedException in C:\xampp\htdocs\vendor\flarum\core\src\User\AssertPermissionTrait.php:31\nStack trace:\n#0 C:\xampp\htdocs\vendor\flarum\core\src\User\AssertPermissionTrait.php(61): Askvortsov\FlarumWarnings\Api\Controller\ListWarningsController->assertPermission(false)\n#1 C:\xampp\htdocs\vendor\askvortsov\flarum-moderator-warnings\src\Api\Controller\ListWarningsController.php(39): Askvortsov\FlarumWarnings\Api\Controller\ListWarningsController->assertCan(Object(Flarum\User\User), 'user.viewWarnin...', Object(Flarum\User\User))\n#2 C:\xampp\htdocs\vendor\flarum\core\src\Api\Controller\AbstractSerializeController.php(96): Askvortsov\FlarumWarnings\Api\Controller\ListWarningsController->data(Object(Laminas\Diactoros\ServerRequest), Object(Tobscure\JsonApi\Document))\n#3 C:\xampp\htdocs\vendor\flarum\core\src\Http\RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractSerializeController->handle(Object(Laminas\Diactoros\ServerRequest))\n#4 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\DispatchRoute.php(65): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Laminas\Diactoros\ServerRequest), Array)\n#5 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\DispatchRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))\n#6 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\SetLocale.php(50): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#7 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#8 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\CheckCsrfToken.php(23): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#9 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#10 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#11 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#12 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#13 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#14 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\RememberFromCookie.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#15 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#16 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#17 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#18 C:\xampp\htdocs\vendor\flarum\core\src\Api\Middleware\FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#19 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#20 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#21 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#22 C:\xampp\htdocs\vendor\flarum\core\src\Http\Middleware\HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#23 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#24 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#25 C:\xampp\htdocs\vendor\middlewares\request-handler\src\RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#26 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#27 C:\xampp\htdocs\vendor\middlewares\base-path-router\src\BasePathRouter.php(97): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#28 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#29 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Middleware\OriginalMessages.php(42): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#30 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#31 C:\xampp\htdocs\vendor\middlewares\base-path\src\BasePath.php(53): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#32 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\Next.php(61): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))\n#33 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))\n#34 C:\xampp\htdocs\vendor\laminas\laminas-stratigility\src\MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))\n#35 C:\xampp\htdocs\vendor\laminas\laminas-httphandlerrunner\src\RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))\n#36 C:\xampp\htdocs\vendor\flarum\core\src\Http\Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()\n#37 C:\xampp\htdocs\index.php(22): Flarum\Http\Server->listen()\n#38 {main}"
}
]
}
`