[freeside-commits] branch FREESIDE_2_3_BRANCH updated. d261f543458b070d7f60703cc1382980a3064c7a

Brian Medley bpm at 420.am
Tue Apr 24 05:44:10 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  d261f543458b070d7f60703cc1382980a3064c7a (commit)
       via  4cc40f6be6ffd7ecc52476e6c9bb394d82123974 (commit)
      from  588d42d7a2999ebb41ad1151bd98b428d2799073 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d261f543458b070d7f60703cc1382980a3064c7a
Merge: 4cc40f6 588d42d
Author: Brian Medley <bpm at snafu.org>
Date:   Tue Apr 24 07:41:48 2012 -0500

    Merge branch 'FREESIDE_2_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_2_3_BRANCH


commit 4cc40f6be6ffd7ecc52476e6c9bb394d82123974
Author: Brian Medley <bpm at snafu.org>
Date:   Tue Apr 24 07:40:00 2012 -0500

    add in access_right checks for sub menues, #17056

diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index 11e4104..7848047 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -221,7 +221,8 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) {
 
   }
 
-  $report_services{$name} = [ \%report_svc, $longname ];
+  $report_services{$name} = [ \%report_svc, $longname ] if
+    $curuser->access_right("Services: $name");
 
 }
 
@@ -253,14 +254,15 @@ tie my %report_inventory, 'Tie::IxHash',
   'Inventory activity' => [ $fsurl.'search/report_h_inventory_item.html', '' ],
 ;
 
-tie my %report_rating, 'Tie::IxHash',
-  'RADIUS sessions' => [ $fsurl.'search/sqlradius.html', '' ],
-  'Call Detail Records (CDRs)' => [ $fsurl.'search/report_cdr.html', '' ],
-  'Unrateable CDRs' => [ $fsurl.'search/cdr.html?freesidestatus=failed'.
-                                               ';cdrbatchnum=_ALL_' ],
-  'Time worked' => [ $fsurl.'search/report_rt_transaction.html', '' ],
-  'Time worked summary' => [ $fsurl.'search/report_rt_ticket.html', '' ],
-;
+my @report_rating = ();
+push(@report_rating, 'RADIUS sessions' => [ $fsurl.'search/sqlradius.html', '' ]) if $curuser->access_right("Usage: RADIUS sessions");
+push(@report_rating, 'Call Detail Records (CDRs)' => [ $fsurl.'search/report_cdr.html', '' ]) if $curuser->access_right("Usage: Call Detail Records (CDRs)");
+push(@report_rating, 'Unrateable CDRs' => [ $fsurl.'search/cdr.html?freesidestatus=failed'.
+    ';cdrbatchnum=_ALL_' ]) if $curuser->access_right("Usage: Unrateable CDRs");
+push(@report_rating, 'Time worked' => [ $fsurl.'search/report_rt_transaction.html', '' ]) if $curuser->access_right("Usage: Time worked");
+push(@report_rating, 'Time worked summary' => [ $fsurl.'search/report_rt_ticket.html', '' ]) if $curuser->access_right("Usage: Time worked summary");
+
+tie my %report_rating, 'Tie::IxHash', @report_rating;
 
 tie my %report_ticketing_statistics, 'Tie::IxHash',
   'Tickets per day per Queue'         => [ $fsurl.'rt/RTx/Statistics/CallsQueueDay', 'View the number of tickets created, resolved or deleted in a specific Queue, over the requested period of days' ],

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/menu.html |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)




More information about the freeside-commits mailing list