Need ability to ban one or more users from a category

We have a group/category that is only visible to logged in users. I.e. we’ve set trust_level_0 to have create/reply/see.

We have a few users who can be disruptive in this particular category, but their input is valued in other categories on the site. Simply asking them to stay away from that first category is not working, I need a way to kick them out, while still allowing them to participate in other categories.

Going the route of explicitly allowing everyone else, minus these few disruptive people, is not realistic as we have over 41,000 users.

Bottom line: We need a way of setting the permission of “all logged in users, minus NN1, NN1, NN3… NNn” to a category.

Any ideas on how this can be accomplished?


You’d need to create a new group, copy all the tl0 users and delete the bad people, and adjust the category permissions. And you’d need to add new people to the group as time goes on.

As Jay mentioned there is no way to create a “minus” in category permissions. This could be done in a plugin that keeps track of a custom group’s membership.

We don’t have any plans on adding “minus” security into the security tab.

One human way of solving this is:

Ban user for 7 days from the forum, if user continues being disruptive in that category ban for 30 days.


I can relate to the quandary. For example, if a passionate member was exemplary in the “cars” category but toxic in the “trucks” category I would be torn. On the one hand I would want to not lose the benefit to “cars”, on the other I would definitely want the “trucks” toxicity to stop.

If the member was reasonable, they would agree to my initial polite request. If they persisted it might be they considered themselves to be an indispensable asset and entitled to misbehave.

Having a way to avoid (postpone?) the need to make hard decisions that could lead to awkward conflict does seem like it would be something desirable. But it would need to be done with a plugin and I don’t know how effective it would be.

I fear that even if a plugin did a type of

if currenUser = "TruckHater" && category = "trucks" 
  currentUser.blocked = true 

that eventually the member would complain about it and react poorly.

I agree with sam that a temporary wrist slap either by a short term Silence (née Block) or Suspend is the better way, even with the risk of losing the benefits to ensure the toxicity stops.


With 41k users and adding 6-10 users every day, that’s just not practical. Neither is monitoring a category 24/7, or for that matter, monitoring the user 24/7.

Follow-up question: Can a user be put on probation, so that every post they make is automatically held for moderation?


This is a great feature request and something that has popped up before, I would like us to have this option but we do not have it now.

Closest would be locking the user at tl0 and putting all tl0 posts through the moderation queue.


Then I’d like to add my voice/vote to this feature request. As forums grow and age, more granular user administration than what Discourse currently offers will be needed, and not just by Jag-lovers.


1 Like

We do this all the time and we have plenty of positive experiences with this approach. There is a plugin though which we haven’t tested yet:

Would be very nice to have that one integrated to the core.


Thank you!

I just installed and tested the plugin, it works exactly like advertised. Please integrate this into the core, like @rizka suggests.

Oh, and please add functionality so that the addition to the list of a user can be time limited. IOW, so they can be put on probation for 1 day, a week, or whatever, then automatically returned to “normal”.



It’s now been over two years. We’ve tried that, it doesn’t work. We have one troublemaker who’s now on his sixth suspension, and around 5 others who are close behind him. All because they can’t keep their cool and stay civil in one particular category. They’re OK in others though, and quite knowledgable, so we’d hate to lose them altogether.

We’re now up to 45,000 users and adding 20-50 every day. Manually assigning access privileges to a category where 99% of the users behave just isn’t practical.

Closing or removing the problematic category also doesn’t work, we’ve tried that. The discussion just spills over into the other categories, and ruins those.

We did the moderation thing for a while, but we just don’t have the manpower for it.

We really need that “minus” security setting. Please.


I’m curious why you don’t ask these users to leave forever when they consistently cannot behave according to community rules? This feature is not on any of our current roadmaps, so you may be waiting a while.

If you really can’t just kick them off, maybe create a not-allowed-in-xxx group and then use CSS to hide their posts in that category?

Encourage people to flag their posts so that they get hidden?

Point well taken, and we do do that, occasionally. The demographics of our community is one of … somewhat challenging personalities. Some of these personalities sit on knowledge that’s of great value to the larger community.

That’s unfortunate. It’s a fairly basic piece of functionality.

Great idea. I’ll look into that. Thanks!

Oh, they do already. They certainly do. :wink:


I think your best bet now is

  1. To mute the problem category on that particular user, via user prefs
  2. CSS hacks / theme component as Jay recommended.

Or just use an IdM to manage groups externally, and have it subtract them from those groups, rather than push discourse to implement a subtractive permissions model.

Problem is, there’s little to stop them just creating other accounts. Your endeavours above have problem quite comprehensively that this is a people problem, not a technology problem.


Thanks for this suggestion!

Can you give some hint on how to implement it?

As far as I know group memberships are not indicated with HTML attributes. Is there some other way for CSS to detect whether or not someone is a member of a particular group?

Hmm. I’m not very good at CSS. I’m pretty sure, though, that the group (or maybe only primary group?) was there when a similar issue came up before. But I could be wrong. You might need to add the current user’s group to the serializer.

You can install this aptly named theme component for that:


Thank you very much!

In my case, I need group memberships to be private, so I will go for this solution instead:

Hardcore Necromancy (my apologies) but somehow when I did it for this other topic this thread didn’t show on the seach.

@Falco I’m trying to use your theme component and I have two questions if you don’t mind:

  1. I basically need to hide every single css component that’s related to a category?

  2. This doesn’t prevent that user being @ and clicking the notification and getting there regardless, right?

Sidenote: @Stephen what’s an “IdM” in this context?

Thanks and sorry for this again. Even if I do agree with @codinghorror’s “cut it from the root” approach sometimes life ain’t that simple…

1 Like