X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FDashboards%2FElements%2FShowPortlet%2Fcomponent;h=5e4e12787e5653e92a2feede38cf9262ed8d3d60;hp=81614a24b6bf4b180d60018c935a5e1d20c28bef;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=e9e0cf0989259b94d9758eceff448666a2e5a5cc diff --git a/rt/share/html/Dashboards/Elements/ShowPortlet/component b/rt/share/html/Dashboards/Elements/ShowPortlet/component index 81614a24b..5e4e12787 100644 --- a/rt/share/html/Dashboards/Elements/ShowPortlet/component +++ b/rt/share/html/Dashboards/Elements/ShowPortlet/component @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -51,4 +51,14 @@ $Portlet $Rows => 20 $Preview => 0 -% $m->comp($Portlet->{path}); +<%init> +my $full_path = $Portlet->{path}; +(my $path = $full_path) =~ s{^/Elements/}{}; + +my $allowed = grep { $_ eq $path } @{RT->Config->Get('HomepageComponents')}; + +% if (!$allowed) { +% $m->out( $m->interp->apply_escapes( loc("Invalid portlet [_1]", $path), "h" ) ); +% } else { +% $m->comp($full_path); +% }