mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 17:16:21 +08:00
56d3e29a69
* Fix user title logic when badge name customized * Fix an issue where a user's title was not considered a badge granted title when the user used a badge for their title and the badge name was customized. this affected the effectiveness of revoke_ungranted_titles! which only operates on badge_granted_titles. * When a user's title is set now it is considered a badge_granted_title if the badge name OR the badge custom name from TranslationOverride is the same as the title * When a user's badge is revoked we now also revoke their title if the user's title matches the badge name OR the badge custom name from TranslationOverride * Add a user history log when the title is revoked to remove confusion about why titles are revoked * Add granted_title_badge_id to user_profile, now when we set badge_granted_title on a user profile when updating a user's title based on a badge, we also remember which badge matched the title * When badge name (or custom text) changes update titles of users in a background job * When the name of a badge changes, or in the case of system badges when their custom translation text changes, then we need to update the title of all corresponding users who have a badge_granted_title and matching granted_title_badge_id. In the case of system badges we need to first get the proper badge ID based on the translation key e.g. badges.regular.name * Add migration to backfill all granted_title_badge_ids for both normal badge name titles and titles using custom badge text. |
||
---|---|---|
.. | ||
admin | ||
about_controller_spec.rb | ||
application_controller_spec.rb | ||
associate_accounts_spec.rb | ||
badges_controller_spec.rb | ||
categories_controller_spec.rb | ||
category_hashtags_controller_spec.rb | ||
clicks_controller_spec.rb | ||
composer_controller_spec.rb | ||
composer_messages_controller_spec.rb | ||
csp_reports_controller_spec.rb | ||
directory_items_controller_spec.rb | ||
draft_controller_spec.rb | ||
drafts_controller_spec.rb | ||
email_controller_spec.rb | ||
embed_controller_spec.rb | ||
exceptions_controller_spec.rb | ||
export_csv_controller_spec.rb | ||
extra_locales_controller_spec.rb | ||
finish_installation_controller_spec.rb | ||
forums_controller_spec.rb | ||
groups_controller_spec.rb | ||
inline_onebox_controller_spec.rb | ||
invites_controller_spec.rb | ||
list_controller_spec.rb | ||
metadata_controller_spec.rb | ||
notifications_controller_spec.rb | ||
offline_controller_spec.rb | ||
omniauth_callbacks_controller_spec.rb | ||
onebox_controller_spec.rb | ||
permalinks_controller_spec.rb | ||
post_action_users_controller_spec.rb | ||
post_actions_controller_spec.rb | ||
post_readers_controller_spec.rb | ||
posts_controller_spec.rb | ||
push_notification_controller_spec.rb | ||
reviewable_claimed_topics_controller_spec.rb | ||
reviewables_controller_spec.rb | ||
robots_txt_controller_spec.rb | ||
safe_mode_controller_spec.rb | ||
search_controller_spec.rb | ||
session_controller_spec.rb | ||
similar_topics_controller_spec.rb | ||
site_controller_spec.rb | ||
static_controller_spec.rb | ||
steps_controller_spec.rb | ||
stylesheets_controller_spec.rb | ||
svg_sprite_controller_spec.rb | ||
tag_groups_controller_spec.rb | ||
tags_controller_spec.rb | ||
theme_javascripts_controller_spec.rb | ||
topics_controller_spec.rb | ||
uploads_controller_spec.rb | ||
user_actions_controller_spec.rb | ||
user_api_keys_controller_spec.rb | ||
user_avatars_controller_spec.rb | ||
user_badges_controller_spec.rb | ||
users_controller_spec.rb | ||
users_email_controller_spec.rb | ||
webhooks_controller_spec.rb | ||
wizard_controller_spec.rb |