In a non-English Discourse forum, switching the default locale exposed bugs in category permissions related to the “everyone” group. Moin found that in German, the group “jeder” incorrectly appears as a broken link (pointing to /g/jeder), while “everyone” in English is not linked at all. Additionally, permission checkboxes for non-default groups are incorrectly disabled in English but not in German, due to hardcoded checks for “everyone” in the code. zogstrip initially thought a commit would fix it, but Moin identified that the fix relied on hardcoded strings instead of group IDs, which breaks across locale changes. A follow-up PR zogstrip addressed most issues — fixing the banner, links, and checkbox behavior — but staff action logs still incorrectly record permission changes when saving categories in non-English locales (e.g., logging a change from “everyone” to “jeder” even when no change occurred). zogstrip submitted a final fix to correct the logging behavior by ensuring consistency regardless of locale. The issue is tagged pr-welcome, inviting community contributions.
I accidentally switched the default locale of my forum to English for a longer time span, so the default groups were renamed and discovered some features related to category permissions and the “everyone” group.
The first difference I noticed was the banner at the bottom.
Then I noticed that while the German “jeder” links to /g/jeder (which doesn’t work, because there is no such group), the English “everyone” isn’t a link.
And third, I learned that when you add another group like “moderators” in English, all permissions are added by default and you are not allowed to remove them, while “everyone” is allowed to do it. In German, this additional help does not work; you can easily remove permissions even though “everyone” is allowed.
The staff action logs are also a little confusing, because it looks like I changed the group, but I did not; I have only clicked “save”, and then the log shows the “everyone” group in two languages:
Since this is pr-welcome now, I think it makes sense to share what I sent zogstrip when I told him that the fix didn’t work.
I think the problem why the link on “jeder” is not suppressed as the link on “everyone” is the fact that “everyone” was hard-coded in the check:
And in a similar way, “everyone” is also hard-coded for the warning shown below and the checkboxes being disabled:
I think it would be safest to check the ID instead. If you use the name of the everyone group based on the default language of the forum, this would still mean that the names would not match between a change of forum language and the execution of the DBConsistency job.
But the staff action logs still behave as if there was a permission change.
If the locale is German, so the group is “jeder,” and I save a category without changing anything, I see this in my staff action logs.
If the locale is English and the group’s name is “everyone,” and I save the category, no permission change is logged.
It’s not because the last time the category was saved the name was different. I can press “save” several times, and each time the log says the permission was changed from “everyone” to “jeder.”