[Rt-commit] r19256 - in rt/3.8/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Thu Apr 16 21:12:09 EDT 2009
Author: sartak
Date: Thu Apr 16 21:12:09 2009
New Revision: 19256
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Dashboards/Queries.html
Log:
r82263 at onn: sartak | 2009-04-16 21:12:01 -0400
Don't allow users to add a dashboard to itself
Modified: rt/3.8/trunk/share/html/Dashboards/Queries.html
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Queries.html (original)
+++ rt/3.8/trunk/share/html/Dashboards/Queries.html Thu Apr 16 21:12:09 2009
@@ -122,6 +122,10 @@
# add dashboards
my $dashboards = $m->comp("/Dashboards/Elements/DashboardsForObjects", flatten => 1);
for my $dashboard (@{ $dashboards || [] }) {
+ # Users *can* set up mutually recursive dashboards, but don't make it THIS
+ # easy for them to shoot themselves in the foot.
+ next if $dashboard->Id == $Dashboard->Id;
+
my $name = 'dashboard-' . $dashboard->Id . '-' . $dashboard->Privacy;
my $desc = "Dashboard: " . $dashboard->Name;
push @items, [$name, $desc];
More information about the Rt-commit
mailing list