Achievements: Add global opt-out of achievements
> **Note:** The implementation approach changed following the discussion in [#600331](https://gitlab.com/gitlab-org/gitlab/-/work_items/600331). See [this comment](https://gitlab.com/gitlab-org/gitlab/-/issues/593740#note_3376323039) for the full rationale. Part of the agreed Engineering Implementation Tasks from the [February 2026 GA roadmap](https://gitlab.com/groups/gitlab-org/-/work_items/9429#note_3101433934): > An explicit opt-out of Achievements should be implemented to stop awards from happening, which allows enterprise user controls. ## What Repurpose the existing `user_preferences.achievements_enabled` column. No new DB column or migration needed. - **Change its meaning** from "display achievements on your profile" to "allow others to award me achievements" - **`Achievements::AwardService`** (`app/services/achievements/award_service.rb`): when `recipient.achievements_enabled == false`, create the `UserAchievement` record with `show_on_profile = false` and suppress the notification email. Return success, not an error. Do not block the award. - **Profile settings UI** (`app/views/user_settings/profiles/show.html.haml:174`): update the checkbox label from "Display achievements on your profile" to "Allow others to award me achievements" (or agreed wording) - **Profile sidebar** (`app/views/users/_profile_sidebar.html.haml:25`): remove the `achievements_enabled` display gate. Display should rely solely on whether any `UserAchievement` records with `show_on_profile: true` exist for that user. ## Notes - No DB migration required: `user_preferences.achievements_enabled` already exists (default `true`), delegated to `User` via `user_preference` - Distinct from `show_on_profile`: that controls visibility of already-awarded badges per achievement; this controls whether new awards are silently accepted or actively shown - Returning an error for opted-out users causes automations to retry indefinitely. Creating the record silently means automations see it exists and stop retrying. If the user later re-enables achievements, suppressed records remain `show_on_profile = false` and can be accepted individually via the pending-acceptance UI.
issue