If a user has a high enough trust level to create a tag, what happens if they try to create a tag in a category with restrictions?

AI-generated summary

In a Discourse category with restricted tag groups and no allowance for other tags, if a user with sufficient trust level (e.g., TL2) attempts to create a new tag not belonging to the permitted group, they will be blocked from posting and shown an error: ‘The ___ category does not allow the ___ tag. Please remove it.’ jessii confirmed this behavior on a test site, clarifying that tag creation is permitted for users above the minimum trust level, but category rules still enforce tag group restrictions. mattdm originally asked to understand the interaction between site-wide tag creation permissions and category-specific tag rules, particularly in anticipation of lowering tag creation permissions for non-admins. pfaffman noted that admins are currently exempt from such restrictions, and Moin linked to a related topic requesting category rules to apply to moderators too. The key takeaway is that even if a user can create tags, they cannot bypass category-specific tag group restrictions — the system enforces those rules at post time, not at tag creation time.

I have a category with:

  • Restrict these tag groups to this category set to a number of tag groups
  • Also allow other tags not checked

and I don’t think this matters, but for completeness:

  • Require new topics to have tags from tag groups set to “1” and one of the tag groups above.

Right now, I have tag creation restricted to admins — each tag should be associated with an active project team, and I don’t want them created arbitrarily and without some of the window-dressing we use [1].

However, once we merge in Ask Fedora, we may want to lower tag creation level to TL2 or TL3.

If we do this, what will happen if someone tries to create a new tag in the first category? Is it:

A) Not just an option — can’t do that here!

or

B) The “Create: ‘whatever’” text comes up, you can create the tag, and then fail to post because you’re violating the rules.

or

C) something I have not imagined?

Thank you!


  1. particularly, configuring Tag Sidebars ↩︎

Great! Only admins can assign tags.

Bummer. Admins are exempt from your rules. Somewhere there’s a You created a topic about it. It would be nice if it would at least warn admins that they were misbehaving, and better still if it would make it easier for the to do the Right Thing, but that ain’t the way the (current) world is.

Right, yeah, that’s me — and that’s why I’m asking rather than trying it.

But this question is somewhat different. I’m wondering how the category tag rules and the “min trust to create tag” site setting interact.

Hey Matthew! If someones doesn’t meet the required trust level to create tags and they try to create a new tag in a topic they should just see No matches found instead of that “Create:___” text, like in the screenshot below:

They only be able to select a tag from the group(s) you have set for your Restrict these tag groups to this category.

Hi @jessii, and thanks. I’m asking about the other way.

If:

  1. there is a tag group requirement for that category, and
  2. no other tags are allowed, and
  3. a user has TL2, and
  4. min trust to create tag is set to TL2, and
  5. that user tries (inadvertently, perhaps) to create a new tag when making a new post…

what happens?

Oh I see, my apologies!

If the user tries to create a tag but there is a tag group requirement for that category then they’ll see
The ___ category does not allow the ___ tag. Please remove it.

Here is what it looks like on my test site: