I have a use case for this. I’m running a gaming forum (for a guild) and we’d like to have the ability to accept applications to join the guild.
- Applications need to be private. The public should see no applications.
- Applications need to be visible to the thread creator.
- Applications need to be able to be visible to a particular group (guild members or officers).
I’ve been digging around the permission code in the discourse backend but it’s still a touch tricky to get my head around. If anyone could give me some pointers that would definitely make things easier.
Edit: After playing around with this idea for a few hours, while I’d like to see it there appear to be a few serious roadblocks that make this concept pretty tricky to pull off as a plugin so I’m hesitant to continue unless this would be something that would be merged into discourse as a whole:
- There’s a very strong relationship between being able to see a category, and being able to see the topics in that category. This assumption is coded in several of the guardians.
- There aren’t really any extension points in the guardian code so I’d need to monkey patch several methods both in the category guardian and in the topic guardian.
- I’d need to add a new permission enum value (4) which would break a plugin if discourse ever decided to make their own extra permission, this could cause some “interesting” data errors.
While I’ve managed to get most of it working by just hacking the discourse code (I haven’t gotten it filtering the topics in the protected category) I don’t want to continue since deploying this code isn’t really something I could easily do.