[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-94-ge1f8be7
Shawn Moore
sartak at bestpractical.com
Mon Jun 28 14:33:46 EDT 2010
The branch, 3.9-trunk has been updated
via e1f8be744fbd91b1448f15613b9fb3aebdc25ce1 (commit)
from 9d1b85ef8ecc58f80f29581bb7feecf8ea4a73f9 (commit)
Summary of changes:
share/html/Tools/Elements/Tabs | 14 ++++++++++----
share/html/Tools/index.html | 16 +++++++++++-----
2 files changed, 21 insertions(+), 9 deletions(-)
- Log -----------------------------------------------------------------
commit e1f8be744fbd91b1448f15613b9fb3aebdc25ce1
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon Jun 28 14:34:36 2010 -0400
Only show dashboards tab if you can see or subscribe to dashboards
diff --git a/share/html/Tools/Elements/Tabs b/share/html/Tools/Elements/Tabs
index 4e49795..aa75222 100644
--- a/share/html/Tools/Elements/Tabs
+++ b/share/html/Tools/Elements/Tabs
@@ -54,10 +54,6 @@
<%INIT>
my $tabs = {
- a => {
- title => loc('Dashboards'),
- path => 'Dashboards/index.html',
- },
b => {
title => loc('Offline'),
path => 'Tools/Offline.html',
@@ -72,6 +68,16 @@ my $tabs = {
},
};
+my $can_see_dashboards = $session{CurrentUser}->HasRight(Right => 'SubscribeDashboard', Object => $RT::System)
+ || RT::Dashboard->new($session{CurrentUser})->_PrivacyObjects;
+
+if ($can_see_dashboards) {
+ $tabs->{a} = {
+ title => loc('Dashboards'),
+ path => 'Dashboards/index.html',
+ };
+}
+
$m->callback( %ARGS, tabs => $tabs );
foreach my $tab ( sort keys %{$tabs} ) {
diff --git a/share/html/Tools/index.html b/share/html/Tools/index.html
index 8e5e02b..26e0f47 100644
--- a/share/html/Tools/index.html
+++ b/share/html/Tools/index.html
@@ -54,11 +54,6 @@
<%init>
my $tabs = {
- A => {
- title => loc('Dashboards'),
- path => '/Dashboards/index.html',
- description => loc('Named, shared collection of portlets'),
- },
B => {
title => loc('Offline'),
path => '/Tools/Offline.html',
@@ -76,6 +71,17 @@ my $tabs = {
},
};
+my $can_see_dashboards = $session{CurrentUser}->HasRight(Right => 'SubscribeDashboard', Object => $RT::System)
+ || RT::Dashboard->new($session{CurrentUser})->_PrivacyObjects;
+
+if ($can_see_dashboards) {
+ $tabs->{A} = {
+ title => loc('Dashboards'),
+ path => '/Dashboards/index.html',
+ description => loc('Named, shared collection of portlets'),
+ };
+}
+
$m->callback( %ARGS, tabs => $tabs );
</%init>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list