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

Jim Brandt jbrandt at bestpractical.com
Mon Dec 21 16:35:17 EST 2020


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

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

    Default $SelfServicePageComponents to an empty list, not HomepageComponents
    
    HomepageComponents are a set of portlets for privileged users and as
    such can't be used by most self service users because of access
    restrictions.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 3d533298f6..76f49a4627 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2963,7 +2963,6 @@ 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.
 
 =cut
 
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 bce8fcc111..93781224ad 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