[Rt-commit] rt branch, 5.0/limit-self-service-page-components-to-sensible-defaults, created. rt-5.0.0-35-g3f0135d888

Dianne Skoll dianne at bestpractical.com
Wed Oct 7 09:24:09 EDT 2020


The branch, 5.0/limit-self-service-page-components-to-sensible-defaults has been created
        at  3f0135d888bac5196c4229dd977198384395b78c (commit)

- Log -----------------------------------------------------------------
commit 3f0135d888bac5196c4229dd977198384395b78c
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Wed Oct 7 09:22:27 2020 -0400

    Default $SelfServicePageComponents to [qw(QuickCreate RefreshHomepage)]
    
    If $SelfServicePageComponents is not set at all, default it to the empty
    list rather than to $HomepageComponents

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 1e573155dc..fba4ea79b1 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2963,14 +2963,14 @@ Set($SelfServiceUseDashboard, 0);
 
 C<$SelfServicePageComponents> is an arrayref of allowed components on
 the SelfService page, if you have set $SelfServiceUseDashboard to true.
-If this is not set at all, then $HomepageComponents is used instead.
+If this is not set at all, then it's equivalent to no allowed components.
 
 =cut
 
 Set(
     $SelfServicePageComponents,
     [
-        qw(QuickCreate QueueList MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches FindUser MyAssets FindAsset FindGroup) # loc_qw
+        qw(QuickCreate RefreshHomepage) # loc_qw
     ]
 );
 
diff --git a/share/html/Dashboards/Elements/ShowPortlet/component b/share/html/Dashboards/Elements/ShowPortlet/component
index 8fb3526a54..166cfb5c89 100644
--- a/share/html/Dashboards/Elements/ShowPortlet/component
+++ b/share/html/Dashboards/Elements/ShowPortlet/component
@@ -59,7 +59,7 @@ my $full_path = $Portlet->{path};
 my $allowed;
 
 if ($m->request_path =~ m{/SelfService/}) {
-    $allowed = grep { $_ eq $path } @{RT->Config->Get('SelfServicePageComponents') || RT->Config->Get('HomepageComponents')};
+    $allowed = grep { $_ eq $path } @{RT->Config->Get('SelfServicePageComponents') || ()};
 } else {
     $allowed = grep { $_ eq $path } @{RT->Config->Get('HomepageComponents')};
 }
diff --git a/share/html/Dashboards/Queries.html b/share/html/Dashboards/Queries.html
index 25bf19a03d..e685a66a9e 100644
--- a/share/html/Dashboards/Queries.html
+++ b/share/html/Dashboards/Queries.html
@@ -89,7 +89,7 @@ my %item_for;
 my @components;
 
 if ($self_service_dashboard) {
-    @components = map { type => "component", name => $_, label => loc($_) }, @{RT->Config->Get('SelfServicePageComponents') || RT->Config->Get('HomepageComponents')};
+    @components = map { type => "component", name => $_, label => loc($_) }, @{RT->Config->Get('SelfServicePageComponents') || ()};
 } else {
     @components = map { type => "component", name => $_, label => loc($_) }, @{RT->Config->Get('HomepageComponents')};
 }

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


More information about the rt-commit mailing list