Skip to content

Conversation

@ZogStriP
Copy link
Member

When saving a category with default "everyone" permissions in non-English forums, staff action logs incorrectly showed a permission change even when nothing changed.

The issue occurred because the backend fallback for empty permissions used the hardcoded English string "everyone", but the frontend sends the localized group name (e.g., "jeder" in German). This mismatch triggered false log entries.

Changed the fallback in categories_controller.rb to use Group[:everyone].name which returns the actual localized group name from the database.

Ref - https://meta.discoure.org/t/335600/14

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/everyone-group-in-category-permissions-in-non-english-forums/335600/15

When saving a category with default "everyone" permissions in non-English
forums, staff action logs incorrectly showed a permission change even when
nothing changed.

The issue occurred because the backend fallback for empty permissions used
the hardcoded English string "everyone", but the frontend sends the
localized group name (e.g., "jeder" in German). This mismatch triggered
false log entries.

Changed the fallback in categories_controller.rb to use Group[:everyone].name
which returns the actual localized group name from the database.

Ref - https://meta.discoure.org/t/335600/14
@ZogStriP ZogStriP force-pushed the fix-permissions-staff-action-logs-with-localized-group-names branch from 8e6b8cc to 7148dba Compare December 14, 2025 20:22
@ZogStriP ZogStriP force-pushed the fix-permissions-staff-action-logs-with-localized-group-names branch from 7148dba to 5d8601a Compare December 14, 2025 20:50
Comment on lines 4 to 5
fab!(:admin)
fab!(:category) { Fabricate(:category, user: admin) }
let(:admin) { Fabricate(:admin) }
let!(:category) { Fabricate(:category, user: admin) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind explaining why you had to put this back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants