I have this same situation: we use Discourse as part of our custom LMS, and we wanted to sometimes limit access to a topic in a course to certain cohorts in the course.
So the only way to do that (as explained above) is to create a category for the course and then a subcategory for every cohort that needs to limit access…then copy each topic into each subcategory, which is kind of a drag, including needing to have models on our side that reflect this setup and code to keep things in-sync.
It would be sooo much more awesome if we could limit posts in each topic to groups.