In a discussion titled “Prevent users from moving topics in other categories” under the Dev category, Crius seeks to restrict topic recategorization to avoid moderation complexity when threads unexpectedly appear in unrelated categories. Although Discourse documentation suggests only Trust Level 3+ users can move topics, Crius observes TL2 users can still do so in their test environment. Heliosurge suggests exploring Custom Trust Levels or using a component to hide the category selector, pointing to a plugin example by @Canapin as a starting point. Crius prefers a simple component over a full plugin and later develops one that conditionally removes the category selector during post editing based on user trust level or group. Canapin provides working JS code targeting composer-title, and Crius expands it to cover title editing, publishing the solution as a theme component on GitHub. Canapin clarifies it’s a theme component, not a plugin, and notes users can bypass it via JS injection or safe mode — suggesting a plugin for stronger enforcement. JammyDodger adds context: TL3/4 can recategorize any topic if “trusted users can edit others” is enabled; locking the first post also blocks category edits. Crius confirms the goal is preventing “category hopping” to streamline moderation. Crius acknowledges the component is a temporary solution until a more secure plugin is developed.
I’m looking for an option to disable this feature as it may cause some complexity in managing threads when you have different moderators teams for different categories and suddenly they find themselves with a big or controversial thread in their category without prior notice.
I’ve read here Access rights for moving a topic to another category but it says that this is something that only Trust Level 3 should be able to do. I’ve a test environment in which a Trust Level 2 user was able to do that.
I tried to enable the “disable editing after staff edit a post” but it didn’t seem to affect the ability to change category for a thread.
I gave it a look, it’s a good MVP but the community I look for is quite tech savvy and it would be better if the DOM would entirely skip drawing that component instead of simply hiding it from view.
Would that require a plugin or is it something I could achieve anyway with a component?
What I need to do, roughly is basically determine if the HTML for that select is generated or not, based on the role.
Alright, thanks to a good friend who suffer from insomnia we figure out where to find the right hook
Here is it, it also adjust the form visuals and allow to select a minimum trust level from which the access to editing category will be available anyway (default trust level 0 to be in line with default discourse settings)
Just to note, a TL3 and TL4 can recategorise any topic as long as trusted users can edit others is enabled. A TL0/1/2 should only be able to do it on their own topic, and only within their editing period [1]. If you lock the first post using the post wrench then that should also stop the category (and title and tags) from being edited.
I’m not 100% sure I’m following your use case, but I’m glad you found a solution.
set by post edit time limit for TL0 and TL1 and tl2 post edit time limit for TL2 and TL3 ↩︎
However, my intent was to prevent the moderators to have to deal with several occurrence of category hopping which may lead to complication in the moderation when a topic is first in a category, then move into another etc etc
I think it would be important to add since it’s a theme component, a user can circumvent these limitations by injecting javascript (I think) or enabling the safe mode if it’s available for them (see enable safe mode setting).
You need a plugin if you want a more secure way to do it.