In a support discussion titled “Restrict answers to trust levels,” j3ang asks if it’s possible to restrict replies (or even hide answers) based on user trust levels or custom fields, since their users migrated from WordPress with tiered memberships. HAWK clarifies whether the goal is to restrict replying or viewing, then confirms that reply restrictions can be set at the category level using trust level groups as shown in an image. When j3ang asks about hiding answers entirely (not just restricting replies), HAWK explains that’s not possible out of the box — but confirms it can be achieved with a custom plugin. j3ang begins experimenting with a plugin, initially overriding postsToRender in TopicRoute, but notes UI glitches and reload issues. After realizing the correct approach is to override the TopicController, they share a revised code snippet that conditionally filters posts based on whether the current user belongs to a privileged group as shown in a video. The final solution uses @discourseComputed to dynamically adjust postsToRender, showing only the first post (the topic) for non-privileged users, while preserving mobile compatibility via capabilities.isAndroid. The thread concludes with j3ang having a working — though still experimental — implementation.
I’m wondering if there’s way to restrict answers/replies to certain trust levels or user custom fields? Our users are migrated from WordPress with different membership level. We don’t want to give all user the capability to view answers unless they’ve reached to certain membership level.