v17development / flarum-blog

The Flarum Blog extension
https://discuss.flarum.org/d/25392-blog-adds-a-blog-section-to-your-community
MIT License
46 stars 20 forks source link

You do not have permission to do that at detail page when not log in #136

Closed ghost closed 2 years ago

ghost commented 2 years ago

go https://domain.xxx/blog/37-test Ex: link I saw You do not have permission to do that. Please help to fix issues, Thank you. I already check log and saw: 401 Unauthorized POST https://zed.mee/api/discussions/37

`Flarum\User\Exception\NotAuthenticate 401 Unauthorized POST https://zed.mee/api/discussions/37

Flarum\User\Exception\NotAuthenticatedException in C:\xampp\htdocs\zed\vendor\flarum\core\src\User\User.php:632 Stack trace:

0 C:\xampp\htdocs\zed\vendor\flarum\core\src\Discussion\Command\ReadDiscussionHandler.php(45): Flarum\User\User->assertRegistered()

1 C:\xampp\htdocs\zed\vendor\illuminate\bus\Dispatcher.php(122): Flarum\Discussion\Command\ReadDiscussionHandler->handle(Object(Flarum\Discussion\Command\ReadDiscussion))

2 C:\xampp\htdocs\zed\vendor\illuminate\pipeline\Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus{closure}(Object(Flarum\Discussion\Command\ReadDiscussion))

3 C:\xampp\htdocs\zed\vendor\illuminate\pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Flarum\Discussion\Command\ReadDiscussion))

4 C:\xampp\htdocs\zed\vendor\illuminate\bus\Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))dException in C:\xampp\htdocs\zed\vendor\flarum\core\src\User\User.php:632

Stack trace:

0 C:\xampp\htdocs\zed\vendor\flarum\core\src\Discussion\Command\ReadDiscussionHandler.php(45): Flarum\User\User->assertRegistered()

1 C:\xampp\htdocs\zed\vendor\illuminate\bus\Dispatcher.php(122): Flarum\Discussion\Command\ReadDiscussionHandler->handle(Object(Flarum\Discussion\Command\ReadDiscussion))

2 C:\xampp\htdocs\zed\vendor\illuminate\pipeline\Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus{closure}(Object(Flarum\Discussion\Command\ReadDiscussion))

3 C:\xampp\htdocs\zed\vendor\illuminate\pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Flarum\Discussion\Command\ReadDiscussion))

4 C:\xampp\htdocs\zed\vendor\illuminate\bus\Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))`

jaspervriends commented 2 years ago

Fixed with #138