UX: add instructions to update email when sso_overrides_email is enabled

UX: add instructions to update email when sso_overrides_email is enabled

diff --git a/app/assets/javascripts/discourse/templates/preferences/account.hbs b/app/assets/javascripts/discourse/templates/preferences/account.hbs
index 800ad4d..41793e0 100644
--- a/app/assets/javascripts/discourse/templates/preferences/account.hbs
+++ b/app/assets/javascripts/discourse/templates/preferences/account.hbs
@@ -41,6 +41,9 @@
         {{/if}}
       </div>
       <div class='instructions'>
+        {{#if siteSettings.sso_overrides_email}}
+          {{i18n 'user.email.sso_override_instructions'}}
+        {{/if}}
         {{i18n 'user.email.instructions'}}
       </div>
     {{else}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 783d6ce..37c711e 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -855,7 +855,8 @@ en:
         primary: "Primary Email"
         secondary: "Secondary Emails"
         no_secondary: "No secondary emails"
-        instructions: "never shown to the public"
+        sso_override_instructions: "Email can be updated from SSO provider."
+        instructions: "Never shown to the public."
         ok: "We will email you to confirm"
         invalid: "Please enter a valid email address"
         authenticated: "Your email has been authenticated by {{provider}}"
diff --git a/config/site_settings.yml b/config/site_settings.yml
index e55460a..f4127f3 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -410,6 +410,7 @@ login:
   sso_overrides_email:
     default: false
     validator: "SsoOverridesEmailValidator"
+    client: true
   sso_overrides_username: false
   sso_overrides_name: false
   sso_overrides_avatar:

GitHub sha: 0c01cb2c

2 Likes