discourse/app/controllers/admin
Martin Brennan 56d3e29a69
FIX: Badge and user title interaction fixes (#8282)
* 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.
2019-11-08 15:34:24 +10:00
..
admin_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
api_controller.rb FEATURE: Overhaul of admin API key system (#8284) 2019-11-05 14:10:23 +00:00
backups_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
badges_controller.rb FIX: Badge and user title interaction fixes (#8282) 2019-11-08 15:34:24 +10:00
color_schemes_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
dashboard_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
email_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
email_styles_controller.rb FEATURE: customization of html emails (#7934) 2019-07-30 15:05:08 -04:00
email_templates_controller.rb FEATURE: Add welcome message for admins. (#8293) 2019-11-05 18:15:55 +05:30
embeddable_hosts_controller.rb DEV: add a few frozen string literals 2019-05-02 16:57:12 +10:00
embedding_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
emojis_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
groups_controller.rb FEATURE: Publish read state on group messages. (Originally introduced in #7989) (#8025) 2019-08-27 09:09:00 -03:00
impersonate_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
permalinks_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
plugins_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
reports_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
robots_txt_controller.rb FEATURE: Allow customization of robots.txt (#7884) 2019-07-15 20:47:44 +03:00
screened_emails_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
screened_ip_addresses_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
screened_urls_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
search_logs_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
site_settings_controller.rb FEATURE: New site settings for default tags in user preferences. (#8283) 2019-11-01 12:40:13 +05:30
site_texts_controller.rb FIX: Badge and user title interaction fixes (#8282) 2019-11-08 15:34:24 +10:00
staff_action_logs_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
themes_controller.rb SECURITY: Safely decompress files. (#8124) 2019-10-03 10:19:35 -03:00
user_fields_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
users_controller.rb FEATURE: Overhaul of admin API key system (#8284) 2019-11-05 14:10:23 +00:00
versions_controller.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
watched_words_controller.rb FEATURE: Watched words improvements (#7899) 2019-07-22 14:59:56 +03:00
web_hooks_controller.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00