Hello, I have a requirement where a user can post topics specific to a Category only after joining that Category. How can we retrieve an API that indicates which Categories the user is allowed to post in and which ones they cannot, ideally showing a lock symbol on the restricted Category cards? How can we achieve this functionality as I believe it requires both client and server side customization.
AI-generated summary
In a discussion titled ‘API request for specific category permissions’ under the Dev category and tagged with rest-api, Steve_John seeks a way to restrict topic posting in specific categories to users who have joined those categories — ideally displaying a lock symbol on restricted category cards. pfaffman clarifies that users don’t join categories directly but join groups, which can then control category access. He suggests that if users are interacting directly via Discourse, this functionality already exists. Heliosurge expands on this by explaining how to configure category security settings: allow ‘Everyone’ to see the category, but restrict ‘Create/Reply’ permissions to specific groups. He also shares a screenshot and example text used to prompt users to apply to join the group before posting. Steve_John thanks pfaffman for the helpful guidance. The solution involves using Discourse’s built-in group-based permissions rather than requiring custom API development or client-side modifications.
Users don’t join categories. They join groups. You can then use groups to control access to categories.
If you’re planning to have the users use Discourse, and not do this via some remote system that you’re trying to integrate, then it just works.
Or maybe you want to display categories for people who aren’t group members?
As Jay mentioned you can do the s via groups.
Create a Category you want visible but restricted.
Category Security Settings
- Everyone - See
- Group name - See/Create/reply
Now everyone can see the category but must join a group to create and respond to topics. Depending on Category purpose you could restrict who all can Create topics by adding a new group will full access with removing the Create permission.
You will want to edit this in Category settings.
To participate in category you need to <a href="/g/Pimaxians/members">Apply</a>
The above is what I use for a restricted category that requires joining a group to post.
Thank you Dan for pointing it to this which is pretty helpful info.
