FriendsOfFlarum / discussion-language

Specify the language a discussion is written in & sort by language
MIT License
6 stars 2 forks source link

403 forbidden when trying to add new discussion #9

Closed andreystavitsky closed 3 years ago

andreystavitsky commented 3 years ago

{"errors":[{"status":"403","code":"permission_denied","detail":"Flarum\User\Exception\PermissionDeniedException in \/app\/www\/vendor\/flarum\/core\/src\/User\/User.php:602 Stack trace:

0 \/app\/www\/vendor\/flarum\/core\/src\/User\/User.php(630): Flarum\User\User->assertPermission()

1 \/app\/www\/vendor\/fof\/discussion-language\/src\/Listeners\/AddDiscussionLanguage.php(40): Flarum\User\User->assertCan()

2 \/app\/www\/vendor\/illuminate\/events\/Dispatcher.php(389): FoF\DiscussionLanguage\Listeners\AddDiscussionLanguage->handle()

3 \/app\/www\/vendor\/illuminate\/events\/Dispatcher.php(218): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()

4 \/app\/www\/vendor\/flarum\/core\/src\/Discussion\/Command\/StartDiscussionHandler.php(71): Illuminate\Events\Dispatcher->dispatch()

5 \/app\/www\/vendor\/illuminate\/bus\/Dispatcher.php(90): Flarum\Discussion\Command\StartDiscussionHandler->handle()

6 \/app\/www\/vendor\/illuminate\/pipeline\/Pipeline.php(130): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()

7 \/app\/www\/vendor\/illuminate\/pipeline\/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

8 \/app\/www\/vendor\/illuminate\/bus\/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then()

9 \/app\/www\/vendor\/illuminate\/bus\/Dispatcher.php(76): Illuminate\Bus\Dispatcher->dispatchNow()

10 \/app\/www\/vendor\/flarum\/core\/src\/Api\/Controller\/CreateDiscussionController.php(75): Illuminate\Bus\Dispatcher->dispatch()

11 \/app\/www\/vendor\/flarum\/core\/src\/Api\/Controller\/AbstractSerializeController.php(115): Flarum\Api\Controller\CreateDiscussionController->data()

12 \/app\/www\/vendor\/flarum\/core\/src\/Api\/Controller\/AbstractCreateController.php(22): Flarum\Api\Controller\AbstractSerializeController->handle()

13 \/app\/www\/vendor\/flarum\/core\/src\/Http\/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractCreateController->handle()

14 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()

15 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\ExecuteRoute->process()

16 \/app\/www\/vendor\/flarum\/core\/src\/Api\/Middleware\/ThrottleApi.php(33): Laminas\Stratigility\

ext->handle()

17 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Api\Middleware\ThrottleApi->process()

18 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/CheckCsrfToken.php(48): Laminas\Stratigility\

ext->handle()

19 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process()

20 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/ResolveRoute.php(67): Laminas\Stratigility\

ext->handle()

21 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\ResolveRoute->process()

22 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/SetLocale.php(50): Laminas\Stratigility\

ext->handle()

23 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\SetLocale->process()

24 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/AuthenticateWithHeader.php(55): Laminas\Stratigility\

ext->handle()

25 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process()

26 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/AuthenticateWithSession.php(32): Laminas\Stratigility\

ext->handle()

27 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process()

28 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/RememberFromCookie.php(51): Laminas\Stratigility\

ext->handle()

29 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process()

30 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/StartSession.php(61): Laminas\Stratigility\

ext->handle()

31 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\StartSession->process()

32 \/app\/www\/vendor\/flarum\/core\/src\/Api\/Middleware\/FakeHttpMethods.php(29): Laminas\Stratigility\

ext->handle()

33 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process()

34 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/ParseJsonBody.php(28): Laminas\Stratigility\

ext->handle()

35 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process()

36 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Middleware\/HandleErrors.php(57): Laminas\Stratigility\

ext->handle()

37 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Flarum\Http\Middleware\HandleErrors->process()

38 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/MiddlewarePipe.php(84): Laminas\Stratigility\

ext->handle()

39 \/app\/www\/vendor\/middlewares\/request-handler\/src\/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()

40 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Middlewares\RequestHandler->process()

41 \/app\/www\/vendor\/middlewares\/base-path-router\/src\/BasePathRouter.php(97): Laminas\Stratigility\

ext->handle()

42 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Middlewares\BasePathRouter->process()

43 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Middleware\/OriginalMessages.php(42): Laminas\Stratigility\

ext->handle()

44 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process()

45 \/app\/www\/vendor\/middlewares\/base-path\/src\/BasePath.php(53): Laminas\Stratigility\

ext->handle()

46 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/Next.php(61): Middlewares\BasePath->process()

47 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/MiddlewarePipe.php(84): Laminas\Stratigility\

ext->handle()

48 \/app\/www\/vendor\/laminas\/laminas-stratigility\/src\/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process()

49 \/app\/www\/vendor\/laminas\/laminas-httphandlerrunner\/src\/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()

50 \/app\/www\/vendor\/flarum\/core\/src\/Http\/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()

51 \/app\/www\/public\/index.php(26): Flarum\Http\Server->listen()

52 {main}"}]}

Flarum core 0.1.0-beta.15 PHP version: 7.4.4 Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, pdo_sqlite, session, posix, readline, Reflection, standard, SimpleXML, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apcu, bcmath, exif, gd, mysqli, pdo_mysql, redis, sodium, zip, Zend OPcache +-------------------------------+------------------+--------+ | Flarum Extensions | | | +-------------------------------+------------------+--------+ | ID | Version | Commit | +-------------------------------+------------------+--------+ | flarum-bbcode | v0.1.0-beta.15 | | | flarum-emoji | v0.1.0-beta.15 | | | flarum-lang-english | v0.1.0-beta.15 | | | flarum-flags | v0.1.0-beta.15 | | | flarum-lock | v0.1.0-beta.15 | | | flarum-markdown | v0.1.0-beta.15 | | | flarum-mentions | v0.1.0-beta.15 | | | flarum-statistics | v0.1.0-beta.15 | | | flarum-sticky | v0.1.0-beta.15.1 | | | flarum-subscriptions | v0.1.0-beta.15 | | | flarum-suspend | v0.1.0-beta.15 | | | flarum-tags | v0.1.0-beta.15 | | | marketplace-l10n-core-russian | 0.1.0-beta.15-19 | | | askvortsov-categories | v2.0.0 | | | fof-upload | 0.12.9 | | | fof-oauth | 0.2.1 | | | fof-polls | 0.3.2 | | | fof-user-directory | 0.5.0 | | | fof-transliterator | 0.3.0 | | | fof-formatting | 0.3.1 | | | flarum-likes | v0.1.0-beta.15 | | | fof-linguist | 0.5.0 | | | clarkwinkelmann-author-change | 0.2.2 | | | fof-follow-tags | 0.6.5 | | | nearata-tags-color-generator | v1.2.0 | | | fof-best-answer | 0.3.6 | | | fof-pages | 0.6.0 | | | fof-profile-image-crop | 0.2.1 | | | clarkwinkelmann-emojionearea | 0.3.0 | | | fof-reactions | 0.5.0 | | | fof-share-social | 0.3.0 | | | fof-links | 0.5.4 | | | fof-user-bio | 0.4.2 | | | fof-analytics | 0.11.0 | | | fof-pretty-mail | 0.3.0 | | | v17development-seo | 1.5.1 | | | fof-sitemap | 0.6.0 | | | askvortsov-moderator-warnings | v0.4.1 | | | fof-split | 0.6.0 | | | fof-socialprofile | 0.2.2 | | | fof-realtimedate | 0.2.1 | | | eikoninaru-ukrainian | v0.1.0-beta.15.2 | | | ianm-follow-users | 0.1.2 | | | fof-drafts | 0.3.1 | | | phenomlab-fancybox-wrapper | 0.4 | | +-------------------------------+------------------+--------+