A platform for community discussion. Free, open, simple.
FIX: Allow users to opt-out of using the site's small logo as the system user avatar. (#11744)
Roman Rizzi7ac9a4d2ecac
diff --git a/app/models/user.rb b/app/models/user.rbindex 07161e8ed01..0fa842fc8e2 100644--- a/app/models/user.rb+++ b/app/models/user.rb@@ -868,7 +868,10 @@ class User < ActiveRecord::Baseenddef avatar_template- if id == Discourse::SYSTEM_USER_ID && SiteSetting.logo_small+ use_small_logo = id == Discourse::SYSTEM_USER_ID &&+ SiteSetting.logo_small && SiteSetting.use_site_small_logo_as_system_avatar++ if use_small_logoUrlHelper.absolute(SiteSetting.logo_small.url)elseself.class.avatar_template(username, uploaded_avatar_id)diff --git a/config/locales/server.en.yml b/config/locales/server.en.ymlindex 7dd6811e407..c4cd31e62c8 100644--- a/config/locales/server.en.yml+++ b/config/locales/server.en.yml@@ -1776,6 +1776,7 @@ en:external_system_avatars_enabled: "Use external system avatars service."external_system_avatars_url: "URL of the external system avatars service. Allowed substitutions are {username} {first_letter} {color} {size}"+ use_site_small_logo_as_system_avatar: "Use the site's small logo instead of the system user's avatar. Requires the logo to be present."restrict_letter_avatar_colors: "A list of 6-digit hexadecimal color values to be used for letter avatar background."selectable_avatars_enabled: "Force users to choose an avatar from the list."diff --git a/config/site_settings.yml b/config/site_settings.ymlindex c0bf6c81697..a040983cf4e 100644--- a/config/site_settings.yml+++ b/config/site_settings.yml@@ -2083,6 +2083,9 @@ uncategorized:hidden: truedefault: true+ use_site_small_logo_as_system_avatar:+ default: true+disable_system_edit_notifications: truenotification_consolidation_threshold: