[Rt-commit] rt branch, 5.0/hide-owner-email-from-login, created. rt-5.0.0-22-gdfff36be9f

? sunnavy sunnavy at bestpractical.com
Mon Sep 14 17:19:56 EDT 2020


The branch, 5.0/hide-owner-email-from-login has been created
        at  dfff36be9f3999449be5038f33a2e733e1f61242 (commit)

- Log -----------------------------------------------------------------
commit dfff36be9f3999449be5038f33a2e733e1f61242
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Sep 15 05:08:27 2020 +0800

    Add $HideOwnerEmailFromLogin config
    
    This supplies a way to protect OwnerEmail from exposing to everyone.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index a7301b3436..1ab5655981 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -393,6 +393,8 @@ displayed as the contact person on the RT's login page.  Because RT
 sends errors to this address, it should I<not> be an address that's
 managed by your RT instance, to avoid mail loops.
 
+See also L</$HideOwnerEmailFromLogin>.
+
 =cut
 
 Set($OwnerEmail, 'root');
@@ -2014,6 +2016,15 @@ L<https://nagix.github.io/chartjs-plugin-colorschemes/colorchart.html>
 
 Set($JSChartColorScheme, 'brewer.Paired12');
 
+=item C<$HideOwnerEmailFromLogin>
+
+By default C<$OwnerEmail> is displayed as the contact person on login
+page. Set this to 1 to hide it.
+
+=cut
+
+Set($HideOwnerEmailFromLogin, 0);
+
 =back
 
 
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 400dd5ac22..2ebc29f369 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -1552,6 +1552,9 @@ our %META;
     HideArticleSearchOnReplyCreate => {
         Widget => '/Widgets/Form/Boolean',
     },
+    HideOwnerEmailFromLogin => {
+        Widget => '/Widgets/Form/Boolean',
+    },
     HideResolveActionsWithDependencies => {
         Widget => '/Widgets/Form/Boolean',
     },
diff --git a/share/html/Elements/LoginHelp b/share/html/Elements/LoginHelp
index 8db1d91050..1b32d641bd 100644
--- a/share/html/Elements/LoginHelp
+++ b/share/html/Elements/LoginHelp
@@ -49,6 +49,7 @@
 <&|/l, RT->Config->Get('OwnerEmail')&>For local help, please contact [_1]</&>
 </div>
 <%init>
+return if RT->Config->Get('HideOwnerEmailFromLogin');
 my $source = RT->Config->Meta('OwnerEmail')->{Source};
 return unless $source->{SiteConfig} or $source->{Extension};
 </%init>

-----------------------------------------------------------------------


More information about the rt-commit mailing list