Theme component to hide topics if user is in a certain group

I forgot to mention, we still want to allow them to see one topic on their Latest- the updated Terms of Service.

I don’t like it much either, but it’s the best I can come up with. The goal is to get all users to sign the updated ToS, with higher than usual importance. There was discussion at How to force existing users to accept ToS that perhaps Discourse Policy could help. But Policy does not enforce anything, and because of the importance of the new ToS we want something more than a blue bubble to nag the users. We had a plugin developed a few years ago to add members to a group when they accepted a policy, and that worked for some things, but I can’t see how to make it work for this.

We already have a fairly elaborate set of groups and categories, so we can’t just change permissions on each category from ‘everyone’ to ‘tos-acceptors’. If category permissions supported boolean logic, perhaps we could change permissions to allow only users who are members of both ‘premium-group’ and ‘tos-acceptors’. But it doesn’t support that.

I don’t have a strong opinion on how to nag them. If there was any built-in enforcement of Discourse Policy, I would use that. But we need more than a blue bubble in this case.

I also briefly considered redirecting them with a permalink if they’re not a member of tos-acceptors. That’s still an option if we could get the user id or username tacked on to the permalink url as query parameters. If we redirect them to a Docusign or something, I could set up a webhook to add them to the group ‘tos-acceptors’ so they stop getting redirected. Does that sound like a better plan?

1 Like