[Bps-public-commit] r20205 - RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Tabs

ruz at bestpractical.com ruz at bestpractical.com
Fri Dec 11 04:52:45 EST 2009


Author: ruz
Date: Fri Dec 11 04:52:44 2009
New Revision: 20205

Modified:
   RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Tabs/Default

Log:
* don't hide Tools from not-public users

Modified: RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Tabs/Default
==============================================================================
--- RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Tabs/Default	(original)
+++ RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Tabs/Default	Fri Dec 11 04:52:44 2009
@@ -8,17 +8,19 @@
     html => $m->scomp('/Elements/ContactInfo'),
 };
 
-my @hide = map loc($_), 'Simple Search', 'Tools', 'Approval';
-foreach my $k ( keys %$toptabs ) {
-    my $title = $toptabs->{ $k }{'title'};
-    next unless grep $title eq $_, @hide;
-    delete $toptabs->{ $k };
-}
-
 foreach my $k ( keys %$toptabs ) {
     next unless $toptabs->{ $k }{'title'} eq loc('Tickets');
 
     $toptabs->{ $k }{'title'} = loc('Search Tickets');
     last;
 }
+
+my @hide = ('Simple Search', 'Approval');
+push @hide, 'Tools' if RT::BugTracker::Public->IsPublicUser;
+ at hide = map loc($_), @hide;
+foreach my $k ( keys %$toptabs ) {
+    my $title = $toptabs->{ $k }{'title'};
+    next unless grep $title eq $_, @hide;
+    delete $toptabs->{ $k };
+}
 </%INIT>



More information about the Bps-public-commit mailing list