Allow category moderators to create subcategories

So this definitely ticks a lot of my boxes on delegating moderation activities where Categories will have a defined scope (eg global Mod role could have issues).

The only item we had remaining on the wish list is for the delegated moderator to have the ability to create a sub-category under their specific scoped category. We are looking into a couple ways to automate category governance or at least make it self-service, but I prefer to keep things in the same context if i can.

Adding that feels complicated in my head.

  1. you need to check for the “mods can create categories” site setting
  2. check category mod status for user and show the category/new wrench
  3. require parent in the new category UI
  4. and parent can only be a list of categories where they are a category mod

Figured I would check to see if it is on the radar or maybe it could work today if I use the correct combination of settings. If not manual category creation by global mods/staff or an external process will be fine as the delegated mods shouldn’t be creating categories all the time.

3 Likes

Can you give any details about your use case? A real-world example of how this would be used might help the cause.

It’s not currently possible. The logic that limits category creation to admins (and moderators if the moderators manage categories and groups setting is enabled) is here:

If the feature can’t get added to the core Discourse code, I think it could be accomplished with a Discourse plugin. It would need to add an additional check to the can_create_category? method to make sure that parent is set and the user has category moderator permission in the parent category.

If a plugin isn’t an option, it could be implemented via the API. Essentially, the system user would make the request to create the subcategory on behalf of the category moderator. This would be fairly complex to develop - probably easiest for cases where you have an external site functioning as the DiscourseConnect provider for a Discourse forum.

3 Likes

For us its the same use case as category scoped mods. Basically provide autonomy to the category mods by group to maintain their little chunk of the community as they see fit.

Agree it feels like this could be added to the main codebase to enhance the category mods pattern and that function is a solid start. I would need to find where the category moderator data is stored and add another OR case to that check.

The more complicated change (I think) though would be in the UI itself where parent is required and they are a category mod. I need to look closer at the code to see if it would be easier to filter the results of parent to only those categories where they are category mods or just a validation case triggered where user is a category mod it would error if parent was not selected or the category. Filtering would be the better ux, but validate pattern is probably simpler to implement.

And thanks for punting this into it’s own Topic. After i had posted on the announce I was feeling like it should have been it’s own thing.

6 Likes

This feels like staff-experience and potentially a good improvement. Do we have rule of three?

I recall @Julienlavigne brought this up in the context of teams, where individual teams need autonomy and also shouldn’t always be allowed to access and look into each other’s categories. Is this something you would still like to see in Discourse?

It might get hairy because it would have to be carefully implemented and a new admin setting would be required because most sites will not want/need to delegate this to category moderators. Also, in principle we do not encourage the creation of alot of categories.

4 Likes

Yeah for us its less private Categories where we want to close off certain Read rights to certain Groups, but that may come. Agreed if this does create sort of an implicit Category admin scoped role. If you create a sub-category it does make sense that the party would want to be able to tweak settings like Read etc.

I had just been thinking about the creation activity, but yeah makes sense that category settings needs to be part of that same scope.

3 Likes

Thanks, Justin. This is helpful.

How many categories with category moderators do you have? How often do you expect categories to be created or modified by category moderators? If privacy is not a concern, then I’m not sure why your category moderators can’t just ask a moderator or admin to make the changes for them.

2 Likes

Probably will be 20-30 top level categories for all the different groups in the office. Each group will have their own structure for subcats.

And 100% definitely can be done via manual ask to a meta like category or other intake. I am thinking each one of the top level categories will have one or two top level moderators with existing category admin privs enabled. They will also manage their category mod group of folks to help manage the chaos and escalate as needed.

Some folks get sensitive about folks having edit to"their" stuff so if I could have done an easy walled garden I would. There won’t be a ton of top level staff so I don’t want turnaround to get bogged down. Once we really get rolling I need to look at reports both on scoped engagement to make sure folks feel heard, but also the admin tier reports to be sure everyone is sticking to the program.

3 Likes

Yes. I would like category moderators to be admin of their category. This would for instance include configuring category settings, permissions, or indeed creating categories. We has solve the latter by automating category creation through the discourse API

5 Likes

I wonder if more people might desire this feature now that Discourse may work well with a lot more categories:

For myself, I’m imagining hosting a forum that has chapters in maybe over 100 countries and maybe other types of categories as well. While it could be done with tags, I like the idea of each country being able to manage its own subcategories without having to ask the admins/staff manually each time because I think category management gives more control over who can view/reply/create than tag management does.

4 Likes