X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Faccess_right.pm;h=289660fa6c60c875b042739ee204950bddfb1276;hb=ee7bb8218d50ca38148427c9b24a8decbd3ace86;hp=85334ed1f6eabad1d027a2639e16c3b7b0585427;hpb=35125976b65791c4b3f88827639ff44f1b13eb17;p=freeside.git diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm index 85334ed1f..289660fa6 100644 --- a/FS/FS/access_right.pm +++ b/FS/FS/access_right.pm @@ -187,7 +187,8 @@ sub _upgrade_data { # class method my @all_groups = qsearch('access_group', {}); - tie my %onetime, 'Tie::IxHash', + #tie my %onetime, 'Tie::IxHash', + my @onetime = ( 'List customers' => 'List all customers', 'List all customers' => 'Advanced customer search', 'List packages' => 'Summarize packages', @@ -224,6 +225,8 @@ sub _upgrade_data { # class method 'Services: Hardware' => 'Services: Hardware: Advanced search', 'Services: Phone numbers' => 'Services: Phone numbers: Advanced search', + 'Services: Accounts' => 'Services: Alarm services', + 'List rating data' => [ 'Usage: RADIUS sessions', 'Usage: Call Detail Records (CDRs)', 'Usage: Unrateable CDRs', @@ -236,13 +239,18 @@ sub _upgrade_data { # class method 'Services: Accounts' => 'Services: Cable Subscribers', 'Bulk change customer packages' => 'Bulk move customer services', 'Configuration' => 'Edit sales people', -; + ); + +# foreach my $old_acl ( keys %onetime ) { +# +# my @new_acl = ref($onetime{$old_acl}) +# ? @{ $onetime{$old_acl} } +# : ( $onetime{$old_acl} ); - foreach my $old_acl ( keys %onetime ) { + while ( @onetime ) { - my @new_acl = ref($onetime{$old_acl}) - ? @{ $onetime{$old_acl} } - : ( $onetime{$old_acl} ); + my( $old_acl, $new_acl ) = splice(@onetime, 0, 2); + my @new_acl = ref($new_acl) ? @$new_acl : ( $new_acl ); foreach my $new_acl ( @new_acl ) {