I have created a tag on my forum that has a permission: only registered users can view these discussions. When one is browsing anonymously the forum and clicks on a link to such a discussion (for instance the auto-generated post that links to another discussion when moving posts), then a red error message appears in the lower-left corner "The requested resource was not found" and 404 can be observed in the browser console. Also, a spinner is shown indefinitely on the screen.
I think that's a Flarum bug. The proper error should be "403 unauthorized", instead of "404 not-found". Also, instead of a floating error and an infinite spinner, a proper error page should be shown informing the user that he is not authorized to view that discussion.
Furthermore, there's a similar error when the tag permission is set to be viewable only by a particular user group and a logged-in user not belonging to that group tries to open a link to such a discussion. This time we have a static error page but again it's 404 which is misleading, instead of 403 and a proper message that informs the user that he is not authorized to view that discussion.
P.S. I'm wondering if it might also be a good idea, in the case an anonymous user encounters 403, to forward to the login page, or show an error and put a link to the login page.