How to restrict anonymous users from posting in specific categories in Discourse?

Hello everyone,

I’m encountering some issues with my Discourse forum and would appreciate your help.

My Requirements:

  1. Anonymous User Group: I have created an anonymous user group, and all anonymous users are automatically added to this group.
  2. Category Permission Settings: I want anonymous users to be able to post only in specific categories, while in other categories, they should only be able to view content and not create posts.

What I’ve Tried:

  1. Creating an Anonymous User Group:
  • I created an anonymous user group and added the email domain for anonymous users to the automatic domain list, ensuring that anonymous users are automatically added to this group.
  1. Configuring Category Permissions:
  • In categories where anonymous users are allowed to post, I set the permissions for the anonymous user group to “Create/Reply/See”.
  • In categories where anonymous users are prohibited from posting, I set the permissions for the anonymous user group to “See”.

Issues Encountered:

  1. Permission Conflict: The trust level of anonymous users is the same as that of regular users (e.g., both have trust level 1). In this case, anonymous users are still able to post in categories where anonymous posting is prohibited.

Help Needed:

  1. Confirmation of Configuration Steps: Are there better ways to configure category permissions to ensure that anonymous users can only post in specific categories?
  2. Additional Suggestions: Are there any other methods or best practices to achieve my requirements?

Thank you very much for your help and suggestions!

So if I am understanding correctly the anonymous users are replying/creating topics by email?

In Category Settings Tab there is setting for email posts. I can’t see the options as I do not have reply by email setup. Here is a pic

I am guessing you might be able to set it here whether or not a reply/post can be done by email maybe.

Thank you for your response!

My issue is not about posting via email, but about how to restrict anonymous users from posting in specific categories. I have referred to this post, but I am still facing some challenges. Below are the details of my situation and the issues I am encountering:

My Goals

  1. Restrict Anonymous Users from Posting: I want anonymous users to be able to post only in specific categories, and in other categories, they should only be able to view the content, not post.
  2. Prevent Permission Conflicts: Even though the trust level of anonymous users is the same as that of regular users (e.g., both are at trust level 0), I want to ensure that anonymous users cannot post in restricted categories.

Issues Encountered

  1. Permission Conflicts: Even though I have set permissions to restrict the anonymous user group from posting in certain categories, the problem arises because anonymous users have the same trust level as regular users (e.g., both are at trust level 0). Due to this overlap, anonymous users can still post in categories where only trust level 0 users are allowed to post. This creates a conflict where anonymous users bypass the restriction because they share the same trust level as regular users.
1 Like

Okay so The Anonymous user group are also full users.

In that case you need to create a Group for your non anonymous users.

Trust Levels are shared among all members where as custom groups are a list of members only

Category Setting

Security

  • +Anonymous Grp See
  • (del)Everyone See/create/reply
  • +NonAnon Grp See/create/reply

Also delete setting if you used a “trust_level_#” group. If the member is part of any group that can create/reply they will have ability to do so even if part of group(s) that do not have the per.issions

There is also a setting that will display a configurable line of text. Html has been added so you can put a link in it.

Ie message might be

To post you must be a member. Request to Join?-(link)

This is one from mine

To participate in category you need to <a href="/g/Pimaxians/members">Apply</a>

The link could also be a Topic that explains how/if access can be achieved

Thank you for your response!

I have implemented your suggested solution, and it has helped me achieve my goal. However, I have a couple of follow-up questions:

  1. Is there a way to automatically add users to the non-anonymous group upon their first login? This would help streamline the process and ensure all new users are properly categorized.
  2. Is it possible to change the default username format for anonymous users? Currently, it defaults to “anonymous” followed by a number, and I would like to customize this format.

Thank you again for your help!

Are these users coming from a different email domain then the anon group? If so that is one option in group settings is emails.

Otherwise not sure. Might be able to also do it via custom user fields (?). May also need a plugin.

How are you determining user groups?

As for Number 2 not sure. At a guess maybe with a plugin? Unless there is a site setting for it in allow anonymous posting

Thank you for your help!

Your suggestions have been very helpful, and my issue is now resolved. I appreciate your assistance and the time you took to help me.

Thanks again!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.