Always-anonymous categories for Discourse
Discourse's anonymous posting functionality is great, but it's a global setting: your site either allows anonymous posting everywhere (except for security-restricted categories). If you want a single—or just a few—categories that enforce always-anonymous posting, this plugin is for you.
The discourse-anonymous-categories plugin adds a configuration setting for each category to force posts to be made anonymously. All posts to these categories—both new topics and replies—will automatically be performed as a user's anonymous pseudonym, regardless of the global anonymous-posting setting.
If the category could not normally be posted in by an anonymous user, turning on the "force anonymous posting" setting will result in many unhappy users. No attempt is made to detect whether an anonymous user (typically at trust level 1) will be able to post successfully; it simply fails with a "You are not permitted to view the requested resource" alert.
In order to trick the UI, the post is treated as a "queued" post. Otherwise, the Discourse front-end doesn't see the anonymous post as the same as the one from the user, and thus doesn't clear out the post editor. By returning a "this post is queued" result, the editor behaves a bit better. Yes, this can be somewhat surprising. On the other hand, it gives us a chance to inform the user that the post was made anonymously, which they might not otherwise expect.
The first version of this plugin was authored by Jared Reisinger.