S.AAKASH_MUTHIAH asks about API support for automatically updating the “Create tag allowed groups” field in Discourse tag settings when creating categories and associated moderator groups via an external application. They want to add 200+ groups automatically and inquire about any limits on the number of groups allowed and whether this approach is advisable. chapoi responds that there’s likely no hard limit but warns of UI unwieldiness. They suggest using Discourse automations or consolidating users into a single group instead of creating individual groups, referencing automation scripts for guidance chapo.
We have an application where creating a category in our app also creates a corresponding category in Discourse. Along with that, a moderator group is created in Discourse for that category, based on a list of users provided from our application.
I need the group created in Discourse to be automatically added to the “Create tag allowed groups” field in the tag settings. Is there an API available to update the “Create tag allowed groups” from the backend automatically, without manually updating it from the application side? This process should happen every time a category is created.
So, if I create 200 categories, 200 corresponding groups will be created and added to the “Create tag allowed groups” field.
My questions are:
Is there any limit on the number of groups that can be added to the “Create tag allowed groups” field?
Also, do you think this approach is a good practice? If not, could you suggest better alternatives?
Not sure, but I don’t think we have a hard limit. The UI may become quite unwieldy though.
You could maybe have a look at making a custom script with automations
If you don’t need every moderator group to be it’s own group, you could instead add that list of users to the same group and only add that one to Create tag allowed groups field. Wouldn’t that suffice?